PHP新手。继续获取
解析错误:语法错误,意外的 T_ECHO
用我的代码。
<?php
header('Location: http://www.dcaccountancyservices.com/index.php?option=com_chronoforms&tmpl=component&chronoform=EditClient&token=' echo $client['id']);
?>
无法弄清楚语法错误是什么。谢谢。
PHP新手。继续获取
解析错误:语法错误,意外的 T_ECHO
用我的代码。
<?php
header('Location: http://www.dcaccountancyservices.com/index.php?option=com_chronoforms&tmpl=component&chronoform=EditClient&token=' echo $client['id']);
?>
无法弄清楚语法错误是什么。谢谢。
在你的行的最后,你有:
echo $client['id']);
您正在尝试将 附加$client['id']
到 URL,因此删除并将其echo
替换为.
:
header('Location: http://www.dcaccountancyservices.com/index.php?option=com_chronoforms&tmpl=component&chronoform=EditClient&token=' . $client['id']);
您必须连接这些值:
<?php
header('Location: http://www.dcaccountancyservices.com/index.php?option=com_chronoforms&tmpl=component&chronoform=EditClient&token=' . $client['id']);
try this
<?php
header('Location: http://www.dcaccountancyservices.com/index.php?option=com_chronoforms&tmpl=component&chronoform=EditClient&token='.$client['id']);
?>
header('Location: http://www.dcaccountancyservices.com/index.php?option=com_chronoforms&tmpl=component&chronoform=EditClient&token='.$client['id']);
You do not use echo
when you want to concatenate a string, you use .
(dot). So change the your header
line to:
header('Location: http://www.dcaccountancyservices.com/index.php?option=com_chronoforms&tmpl=component&chronoform=EditClient&token='.$client['id']);