我需要使用exec
将信息从php发送到c ++,但我不能也不知道为什么这不起作用
我也用escapeshellcmd()
但没有改变
<?php
$a=2; // here 1st value
$b=3; // here 2nd value
exec("project $a $b", $out); // here $a and $b should send the info to project but it's the problem
print_r($out); // here i use print_r to general use as some time the info be as array and echo won't print it
?>
我看到了结果
Array ( [0] => -858993460-858993460 )
-858993460
是int
类型
答案 0 :(得分:0)
也许这对你有用:
exec("project.exe {$a} {$b}", $out);