【发布时间】:2013-03-14 02:18:03
【问题描述】:
我正在尝试使用 PHP Exec 命令行将文本字符串作为变量传递,但没有传递整个文本。
文字是这样的:
$title_page = 'Channel | This is the channels title';
那么执行行是:
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:-/
标签: php string text arguments exec