Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想问你我是否用 system() 调用任何应用程序;在 PHP5 中是否可以将该应用程序的结果直接获取到 php?(而不是做 SomeApp >> file.txt - 并在 PHP 中读取文件)。
例如:system('lynx page.html'); 我想将“lynx page.html”的结果放入变量中。
谢谢你。
最简单的方法是使用反引号运算符:
$out = `ls -a`;
您也可以使用shell_exec("command"),这是等效的。
shell_exec("command")
我刚刚在我的 JQuery 的一行中发现了一个错误,我不知道如何处理它。
// Enable valid swatch images $.each(sizes, function (index, element) { $("#variations img[alt='" + element + "']") .parent().