Search
 
SCRIPT & CODE EXAMPLE
 

PHP

How to send data from PHP to Python

$response = shell_exec("python3 script.py" . escapeshellarg(json_encode($data)));
Comment

send data from php to python

/*
this code php send data to python
*/
<?php 
	$data = 'Hayder'; 
    $output=shell_exec("python E:/test.py "  .$data);
    echo $output;
?>

\\\\\\\\\\\\\

/*
this code python to show data 
*/
import sys
result = sys.argv[1]
print(result)
Comment

PREVIOUS NEXT
Code Example
Php :: pass php variable in onclick function 
Php :: woocommerce get user id by email 
Php :: How to create an array from a CSV file using PHP 
Php :: laravel middleware check if user is logged in 
Php :: how to count no of words in a string in php without using string functions 
Php :: if value conatins in word check in php 
Php :: laravel blade auth user 
Php :: laravel get url without domain in blade 
Php :: php display errors 
Php :: string to carbon 
Php :: laravel query get big table records 
Php :: composer cache clean 
Php :: wordpress global variable not working 
Php :: php print array 
Php :: form validation with larvel api 
Php :: how to take last entry in database in laravel Method ONe 
Php :: php convert special characters to normal 
Php :: use class Auth larave3l 
Php :: php base64img to file 
Php :: PHP strtoupper() Function 
Php :: get current route in blade laravel 
Php :: php memory usage view 
Php :: laravel run a specific migration 
Php :: php include and require statements 
Php :: laravel login redirect to previous page 
Php :: linux set default php 
Php :: update sql php 
Php :: acf php fields 
Php :: laravel validate file type 
Php :: max. post size 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =