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 :: php curl request 
Php :: php catch exception 
Php :: find substring in string php 
Php :: laravel command parameter optional 
Php :: laravel create project with auth 2021 
Php :: php array_map() 
Php :: laravel carbon 
Php :: laravel how to check if there are record exists 
Php :: php date set utc hours 
Php :: php take picture with mobile camera 
Php :: Get the post category if you have a custom post_type 
Php :: générer des nombres aléatoires décimaux en php 
Php :: how increase php upload size in wordpress 
Php :: php delete directory 
Php :: str_replace smarty template 
Php :: php get file location 
Php :: php -S localhost:8000 
Php :: enum artisan codwe 
Php :: php artisan storage:link not working 
Php :: wordpress get user profile picture 
Php :: how to install symfony in windows 10 
Php :: drupal 8 get enabled languages 
Php :: doctrine orm get all 
Php :: laravel-cors 
Php :: laravel store array to cache 
Php :: Instalar Lamp server en Ubuntu 
Php :: explode with new line 
Php :: submonth carbon 
Php :: laravel npm run dev mix error FIX 
Php :: get file extension php 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =