【发布时间】:2011-12-10 10:26:13
【问题描述】:
我正在从以下链接的页面上的 $_GET 检索数据:
<a class="send" href="<?php echo sendData.php?user=somebody&password=any; ?>">Send POST info</a>
在本地使用 XAMPP 和
<?php
$user = urlencode($_GET['user']);
$password = urlencode($_GET['password']);
echo '<strong>user: </strong>'.$user.' <strong>password: </strong>'.$password;
?>
它工作正常,但是在编码时
<?php
$url=rawurlencode('sendData.php');
$url .= urlencode('?user=somebody&password=any');
?>
<a class="send" href="<?php echo $url; ?>">
Send POST info
</a>
链接页面被禁止访问
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
18.10.2011 ã. 23:00:31 ÷.
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1
有什么想法吗?
【问题讨论】:
标签: php apache xampp localhost