May 21, 2019
PHP运行python文件, How to call Python file from within PHP?
<?php
$command = escapeshellcmd('/usr/custom/test.py');
$output = shell_exec($command);
echo $output;
?>
PHP:escapeshellcmd()的用法_命令行函数
escapeshellcmd — shell 元字符转义
说明
string escapeshellcmd ( string $command )
escapeshellcmd() 对字符串中可能会欺骗 shell 命令执行任意命令的字符进行转义。 此函数保证用户输入的数据在传送到 exec() 或 system() 函数,或者 执行操作符 之前… Read More