我试图使用PHP Exec命令行将文本字符串作为变量传递,但整个文本未被传递。如何将文本字符串作为PHP Exec命令传递
的文字是这样的:
$title_page = 'Channel | This is the channels title';
那么EXEC行是:
exec("$path_to_php $emailer $article_sub_security_var $article_id > /dev/null &");
林检索它们是这样的:
$article_sub_security_var = $_SERVER['argv'][1];
$article_id = $_SERVER['argv'][2];
$page_title = $_SERVER['argv'][3];
命令行与正常工作$ page_title的例外。它只返回字符串的一部分,而不是全部。
任何建议,以完全赞赏通过它。
我在您的exec声明中的任何地方都没有看到'$ title_page'或甚至$ page_title': -/ – Crisp 2013-03-24 16:03:00
谨慎使用exec! – 2013-03-24 16:50:30