首页 > 解决方案 > 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\" />

标签: phpauthenticationdirectorysubdomainvbulletin

解决方案


推荐阅读