我试图弄清楚为什么我不能在其中包含一个函数。我正在尝试使它$client
成为请求字符串的方式。http://test.com/next.xml?file=$client&test=againtest
$client
被定义为我数据库中的文本。
function update($pro){
$request = 'http://test.com/next.xml?file='.$client'&'.'test='.urlencode($pro);;
$postargs = 'status='.urlencode($pro);
return $this->process($request,$postargs);
}
有什么方法可以做到这一点吗?这不会给我任何 PHP 错误,但它不能正常工作。如果我删除'.$client.'
它并用纯文本替换它,例如text
它可以工作,但是当我将它作为一个函数包含时,它就不起作用了。