都不知道你的“显然错误”怎么得出来的?REQUEST_URI是标准,你根本都不知道它是什么意思,这个保存的就是你的请求URL,不管这个URL是否存在。REDIRECT_URL只是有些Apache支持,REQUEST_URI是所有Apache都支持。给你引用一段话,看不懂就别人给你翻译: Now checking REQUEST_URI environment variable on Apache, in addition to REDIRECT_URL. On some Apache systems, only REQUEST_URI is supported, and so Guardian will be able to correctly detect the error URL on those systems. On other Apache systems, both REQUEST_URI and REDIRECT_URL are supported, but the former is more accurate, and so Guardian will have more accurate information there.
TO Meteorlet(www.dictworld.com) : 不好意思, 向您表示真诚地道歉! 不过$_SERVER['REQUEST_URI']我已经试过了,在我电脑上确实无法得到之前的页面,返回仍是当前页面的URL! 可能是我的配置有问题! 还请大家帮忙!
显然错误!
还望高手解决!WinXP
php 5.1 (以apache模块方式安装)
apache 2.0
Now checking REQUEST_URI environment variable on Apache, in addition to REDIRECT_URL. On some Apache systems, only REQUEST_URI is supported, and so Guardian will be able to correctly detect the error URL on those systems. On other Apache systems, both REQUEST_URI and REDIRECT_URL are supported, but the former is more accurate, and so Guardian will have more accurate information there.
你都成星星啦。呵呵,唉。惭愧那。
Apache的ErrorDocument定义的error.php文件根本就不是转向过去的,你可以近似的看成是include的。
GaoXX: 按照你的说法,$_SERVER['REQUEST_URI']应该是正确的啊 可是取不到值 :(
<?php
echo $_SERVER['REQUEST_URI'];
?>可以取到的,换台机子试试
http://community.csdn.net/Expert/topic/4408/4408993.xml?temp=.2011835不知道你解决没有啊。帮小弟一把。磕头了。
echo $_COOKIE['page'];就能达到你的目的