wazhxix
wazhxix
关注数: 9
粉丝数: 36
发帖数: 238
关注贴吧数: 29
获取self的问题。。 class Aa def s #somecode end end a = Object.new a.instance_eval{$b = Aa.new.s} p a==$b somecode要怎么写才能让p a==$b返回true?
求救.....为啥php输出的js代码运行不了... <html> <body> <canvas id=1></canvas> <script> var canvas=document.getElementById("1") alert(canvas.getContext) </script> </body> </html> 保存成.html运行正常....保存成.php就输出undefined,为啥?
快疯了....求助... 我的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打开就有消息框了.....求原因....
这个错误啥意思? 读取根目录正常,但是一读取子目录下的文件就这样.....这是啥情况?
新学php,求助 //一切正常 function map($a=null){ if($a==null){$dir=opendir(".");}else{$dir=$a;}; rewinddir($dir); while(($file=readdir($dir))!=false){ echo $file."</br>"; if(is_dir($file)){echo "-></br>";}; }; } map(); //为啥这个会显示取消操作? function map($a=null){ if($a==null){$dir=opendir(".");}else{$dir=$a;}; rewinddir($dir); while(($file=readdir($dir))!=false){ echo $file."</br>"; //只有这里改了一下 if(is_dir($file)){map($dir);}; }; } map(); 和php设置有关系么?
有什么好点的工具检测兼容性么 最好有不同浏览器的效果对照
新人冒泡,顺便求助 学js有段时间了,可封装那里一直不咋懂……想写一个类(应该是这么叫的吧……)定为a,这个类下面有一个方法b,还有一个方法c,写成a()的时候仅使d[0]=111,写成a.b()时仅使d[2]=222,a.c()仅让d[3]=333,这个咋写?我写出来的只要用了b()俩方法就一起上了……
1
下一页