Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图在 PHP 标头函数中合并一个变量,但它似乎不起作用,它在地址栏中显示实际变量或只是加载一个空白屏幕。感谢您对此的帮助。
代码如下
header('Location: http://'.$soft_url/main');
该代码格式错误。
header('Location: http://'.$soft_url.'/main');
可能会解决您的问题
试试这个:
header('Location: http://' . $soft_url . '/main');
header("Location: http://$soft_url/main");