怎样获得当前页面的完整url? $fileurl=$DOCUMENT_ROOT.$filename;allright 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 $url = 'http://'.getenv('HTTP_HOST').getenv('REQUEST_URI'); 如果你能仔细看看 phpinfo() 的话就不用花这 10 分了 $_SERVER["REQUEST_URI"] 这个是 4.1 以后才能用的…… 没试过3.几版本的php,应该也行,因为这是环境变量,不过估计不能用$_SERVER['...'],应该用getenv(). 来看看chinaren是怎么用JS实现的吧function UrlConv(url){ if(url.href.indexOf("backdoor.jsp")>0) url="http://www.chinaren.com"; url = url + ""; var m_url = url; var outstring = ""; var x1 = 0; for(x1 = 0 ; x1 < (m_url.length) ; x1++) { chr = m_url.substr(x1,1); if(chr=='&') { outstring += "%26"; continue; } if(chr=='?') { outstring += "%3F"; continue; } if(chr==':') { outstring += "%3A"; continue; } outstring += chr; } return outstring;}function login(){ top.document.location = "http://profile.chinaren.com/zhs/login.jsp?group=alumni&url="+UrlConv(top.window.location);}function logout(){ top.document.location = "http://profile.chinaren.com/zhs/backdoor.jsp?group=alumni&url="+UrlConv(top.window.location);}function register(){ top.document.location = "http://profile.chinaren.com/zhs/register.jsp?group=alumni&url="+UrlConv(top.window.location);} 这样的数据库怎么搞更好些? php发邮件问题!在线等!还有一个版本! eclipse+PDT中,只要鼠标悬停在html代码上面,就会有弹窗提示这个代码的功能,请问如何不然它提示呢 如何去掉字符窜的最后一个字符 fsockopen 服务器拒绝 超时 PHP PDO 调用存储过程 返回多个集合 和 输出参数 如何获取? 如何读文本??? 如何知道本页面的实际路径中的文件名?? 提供PHP+MYSQL空间,数量有限,快来。。。 动态缩小图片 为什么在浏览器中无法正常显示中文? 如何多次使用header函数?
如果你能仔细看看 phpinfo() 的话就不用花这 10 分了 $_SERVER["REQUEST_URI"] 这个是 4.1 以后才能用的……
{
if(url.href.indexOf("backdoor.jsp")>0)
url="http://www.chinaren.com";
url = url + "";
var m_url = url;
var outstring = "";
var x1 = 0;
for(x1 = 0 ; x1 < (m_url.length) ; x1++)
{
chr = m_url.substr(x1,1);
if(chr=='&')
{
outstring += "%26";
continue;
}
if(chr=='?')
{
outstring += "%3F";
continue;
}
if(chr==':')
{
outstring += "%3A";
continue;
}
outstring += chr;
}
return outstring;
}
function login(){
top.document.location = "http://profile.chinaren.com/zhs/login.jsp?group=alumni&url="+UrlConv(top.window.location);
}function logout(){
top.document.location = "http://profile.chinaren.com/zhs/backdoor.jsp?group=alumni&url="+UrlConv(top.window.location);
}function register(){
top.document.location = "http://profile.chinaren.com/zhs/register.jsp?group=alumni&url="+UrlConv(top.window.location);}