我試圖使用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