wazhxix wazhxix
关注数: 9 粉丝数: 36 发帖数: 238 关注贴吧数: 29
快疯了....求助... 我的php文件: <html> <head> <?php $dir=opendir("."); $basename="base"; while(($file=readdir($dir))!=false){ if(stristr(stristr($file,$basename),".js")==".js" and stristr($file,$basename)==$file){$_basename=$file;}; }; if($_basename){echo "<script src=\"$_basename\"></script>";}; closedir($dir) ?> <script> if(new type.listener){alert("ddd")}; </script> </head> <body> <?php function map($a='.'){ foreach(scandir($a) as $file){ if($file=='.'||$file=='..'||$file=='phpMyAdmin'||$file=='index.php'||$file=='index-x.php'){continue;}; if(is_dir($a.'/'.$file)==false && stristr($file,'.php')=='.php'){ echo '<a onclick="parent.document.getElementById(\'frame\').src=\''.$a.'/'.$file.'\'">'.$file.'</a></br>'; } else if(is_dir($a.'/'.$file)){ echo'</br><a>'.$file.'</a></br>'; map($a.'/'.$file);}; }; } map(); ?> </body> </html> 打开后生成的html源代码: <html> <head> <script src="base v0.4.js"></script><script> if(new type.listener){alert("ddd")};//没反应 </script> </head> <body> </br><a>aaaa</a></br><a onclick="parent.document.getElementById('frame').src='./aaaa/PHP可阅读随机字符串.php'">PHP可阅读随机字符串.php</a></br><a onclick="parent.document.getElementById('frame').src='./aaaa/a.php'">a.php</a></br></br><a>data</a></br><a onclick="parent.document.getElementById('frame').src='./p.php'">p.php</a></br></body> </html> 使用php打开后没有消息框....但是我把这段粘到一个新的html,然后用html打开就有消息框了.....求原因....
1 下一页