http://yu.diy.40it.com/savedocument/数据库的例子1.php 结果: Not Found The requested URL was not found on this server.<?php $url = "http://yu.diy.40it.com/savedocument/".urlencode("数据库的例子1.php"); ?>http://yu.diy.40it.com/savedocument/%CA%FD%BE%DD%BF%E2%B5%C4%C0%FD%D7%D31.php结果: CGI/PHP程序错误: 该脚本不允许执行--------------------------------------------------------------------------------/www/users/yu.diy.40it.com/savedocument/数据库的例子1.php 不允许执行原因是: 脚本路径中含有非法元素!服务器端配置: Server Administrator/Contact: [email protected] Server Name: yu.diy.40it.com Server Port: 80 Server Protocol: HTTP/1.1 访问请求数据: User Agent/Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) Request Method: GET Remote Address: 203.207.68.50 Remote Port: 38038
结果:
Not Found
The requested URL was not found on this server.<?php
$url = "http://yu.diy.40it.com/savedocument/".urlencode("数据库的例子1.php");
?>http://yu.diy.40it.com/savedocument/%CA%FD%BE%DD%BF%E2%B5%C4%C0%FD%D7%D31.php结果:
CGI/PHP程序错误: 该脚本不允许执行--------------------------------------------------------------------------------/www/users/yu.diy.40it.com/savedocument/数据库的例子1.php 不允许执行原因是:
脚本路径中含有非法元素!服务器端配置: Server Administrator/Contact: [email protected]
Server Name: yu.diy.40it.com
Server Port: 80
Server Protocol: HTTP/1.1 访问请求数据: User Agent/Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
Request Method: GET
Remote Address: 203.207.68.50
Remote Port: 38038
但是%CA%FD%BE%DD%BF%E2%B5%C4%C0%FD%D7%D31.php
是如何通过php转化来的呢
<?php
$url = "http://yu.diy.40it.com/savedocument/".urlencode("数据库的例子1.php");
?>
try
http://yu.diy.40it.com/search/
输入"数据"查询
//链接文件
<?
$url = urlencode("数据库列表.php");
$url = "http://yu.diy.40it.com/savedocument/".$url;
?>
<a href="<?=$url?>"><?=$url?></a>//结果
url:http://yu.diy.40it.com/savedocument/%CA%FD%BE%DD%BF%E2%C1%D0%B1%ED.phpCGI/PHP程序错误: 该脚本不允许执行--------------------------------------------------------------------------------/www/users/yu.diy.40it.com/savedocument/数据库列表.php 不允许执行原因是:
脚本路径中含有非法元素!服务器端配置: Server Administrator/Contact: [email protected]
Server Name: yu.diy.40it.com
Server Port: 80
Server Protocol: HTTP/1.1 访问请求数据: User Agent/Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Request Method: GET
Remote Address: 61.145.211.195
Remote Port: 43156
Referring Page: http://127.0.0.1/test/to1.php
在我的系统下可以正确执行,但直接用"测试.php"不行
这个我的意见是:http://yu.diy.40it.com/savedocument/test.php?p=(数据库的例子1.php)
这样子啊.然后在test.php里写。
<?
if (!isset($p)){ // 判断变量是否已定义,并对错误处理
$p="100";
}
switch ($p) {
case "数据库的例子1.php":
include "http://yu.diy.40it.com/savedocument/数据库的例子1.php";
break;
case "100":
echo "<br> 请使用正确的方法访问本站!!!";
break;
default:
echo "<br>你访问的页面不存在"; //默认的,其他出错页面
break;
}
?>
哎,我也没时间试,给你提个想法吧:)php本来对中文就支持不怎么好,也不知道你为什么要用中文来做问文件名,郁闷!