我目前正在用PHP和python搞砸。我做了一个简单的Python脚本这实际上只是 - print "Hello World"
php只返回数组中的变量到网页
我的PHP脚本(这是在我的主要的index.php页)如下:
<?php
$output = null;
exec('C:\\Python27\\python.exe py\\test.py', $output, $return);
print_r($output);
?>
我的问题是,它返回:
阵列([0] =>的Hello World)
有谁知道如何只返回Hello World
到我的网页? 任何帮助将不胜感激。
读http://php.net/manual/en/function.exec.php – 2012-03-31 21:24:22
中继()可能http://www.php.net/manual/en/function.passthru.php – 2012-03-31 21:24:36
Yeesh我觉得自己是个笨蛋......谢谢你们两个。 – Meh 2012-03-31 21:26:51