PHP 启动页面生成器
我正在尝试创建一个启动页面生成器,但有一个小问题。
$accountid = $_POST['accountid'];
(我还尝试使用 $_GET 和 $_REQUEST,表单页面已完成并且名称正确)
$reflink = "< a href="http://www.site.com/?ref=$accountid">today< / a>";
echo "Join " . $reflink . "line breaks here;
问题是斜杠 // 也用于注释,并且当删除 http:// 时链接不起作用在服务器文件中进行搜索,例如 site.com/files/site.com/?r=
我也尝试过使用 www.,但不起作用。
任何帮助表示赞赏。
我在代码中添加了一些空格,否则无法正常显示。
I am trying to create a splash page generator and I have a small problem.
$accountid = $_POST['accountid'];
(I also tried with $_GET and $_REQUEST and the form page is done and the name is correct)
$reflink = "< a href="http://www.site.com/?ref=$accountid">today< / a>";
echo "Join " . $reflink . "line breaks here;
The problem is that the slashes // are used for comments too and the link is not working, when removing the http:// it searches in the server files like site.com/files/site.com/?r=
I also tried with www., not working.
Any help is appreciated.
I have put some spaces inside the code, otherwise it wouldn't show properly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我理解你的问题,你需要转义引号:
或:
如果
$accountid
是一个整数,我也会使用:(无论如何我都会清理它,但似乎是一个整数...)
As far as I can understand your question, you need to escape the quotes:
or:
And if
$accountid
is an integer, I would also use:(I would clean it up anyway, but it seems it´s an integer...)
您需要转义引号:
You need to escape your quote marks: