日期:2014-05-17 浏览次数:20542 次
<?php $hu = 'yuan'; @require_once('global.php'); $domain = $_POST['domain']; if($domain){ is_domain($domain) or exit( "<script language=javascript>alert('请输入正确的域名!');location.href='index.php';</script>"); $content = @file_get_contents("http://".$domain); @require_once('cache.php'); if(file_exists("cache/cache.php")){ @require_once("cache/cache.php"); $urls = filehave($urls,$domain); }else{ $urls = fileno($domain); } writeover("cache/cache.php","<?php\r\n\$urls=".vvar_export($urls).";\r\n?>"); } ?> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>网页源代码查看器</title> <form id="f" action="" method="POST"> <input name="domain" type="text" id="domain" class="input" size="40" url="true" value="<?php echo $domain?>"/> <input name="btnS" class="but" type="submit" value="查询" id="sub"/> </form> <textarea id="content" name="content" style="width:750px;height:850px;border:1px solid #c5e2f2;overflow:visible;" cols="20" rows="65"><?php echo $content;?></textarea></div> 最近查询 <table> <tr><td align="left" style= "word-wrap:break-word;word-break:break-all"> <?php @require_once('cache/cache.php'); if($urls){ foreach ($urls as $key=>$v){ echo "<a href=http://www.vipcha.net/5/".$urls[$key]." target=_blank>".$urls[$key]."</a> "; }}?></td></tr> </table>
<?php //在哪都能加 $path_parts = pathinfo($_SERVER['REQUEST_URI']); print_r($path_parts); ?>
------解决方案--------------------
网址是这样的 www.vipcha.net/5/
那么你实际访问的是 www.vipcha.net/5/index.php
如果那个 5/ 适当做参数时 那要这样才行 www.vipcha.net/index.php/5
这就是 PATH_INFO
我想实现的功能是这样的
www.vipcha.net/5/www.baidu.com
这就需要 urlrewrite 了,因为需要隐藏php文件名