php - PHP - 外部登录脚本重定向问题
问题描述
我在为 VBulletin 使用此外部登录脚本时遇到问题。我有一个子域,其中包含“ forum.blacklist-rs.com ”下的论坛,外部脚本在根目录“ public_html ”上运行。
我正在尝试通过根目录上的此脚本成功登录,但不幸的是,每次我登录时,脚本首先包括我的主域,如下所示: blacklist-rs.com/forum.blacklist-rs.com/login。 php?=
如果有人可以帮助我找到一个非常感谢的解决方案!
脚本如下
<?php
$curdir = getcwd();
chdir('/home/blackli1/forum.blacklist-rs.com');
require_once('/home/blackli1/forum.blacklist-rs.com/global.php');
chdir($curdir);
if ($vbulletin->userinfo['userid'] == 0) {
echo "<form id=\"login\" action=\"forum.blacklist-rs.com/login.php?do=login\" method=\"post\" onsubmit=\"md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)\">
<script type=\"text/javascript\" src=\"forum.blacklist-rs.com/clientscript/vbulletin_md5.js?v=364\"></script>
<a href=\"forum.blacklist-rs.com/register.php\">Register</a>
<label for=\"navbar_username\">Username</label>
<input type=\"text\" class=\"bginput\" style=\"font-size: 11px\" name=\"vb_login_username\" id=\"navbar_username\" size=\"10\" accesskey=\"u\" tabindex=\"101\" onfocus=\"if (this.value == 'User Name') this.value = '';\" />
<label for=\"navbar_password\">Password</label>
<input type=\"password\" class=\"bginput\" style=\"font-size: 11px\" name=\"vb_login_password\" id=\"navbar_password\" size=\"10\" tabindex=\"102\" />
<label for=\"cb_cookieuser_navbar\"><input type=\"checkbox\" name=\"cookieuser\" value=\"1\" tabindex=\"103\" id=\"cb_cookieuser_navbar\" accesskey=\"c\" />Remember Me?</label>
<input type=\"submit\" class=\"button\" value=\"Login\" tabindex=\"104\" title=\"Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself.\" accesskey=\"s\" />
解决方案
推荐阅读
- r - 为大列表的每个元素自动在大列表中创建向量的功能
- node.js - 错误阻止捆绑:使用 ecmascript 处理文件时(针对目标 web.browser):
- c# - 插入包含字符串的变量作为新列表c#的参数
- angular - 如何从角度的承诺中获取网址?
- rust - 对超出函数的局部 Arc 的引用
- android - 取消暂停通知
- python-3.x - conda 创建环境中的 conda list vs pip list 差异
- c# - 在后台工作人员中使用 SendKeys.SendWait 时,为什么我能听到 3 秒的哔声?
- java - 使用 Jackson 和 Jersey 反序列化 java.ws.rs 实体会引发异常
- python - 有条件地将一幅图像的像素值分配给另一幅图像