Re: [請益] 有沒有法子把 $this pass 掉

看板PHP作者 (吹笛牧童)時間16年前 (2008/07/13 19:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/4 (看更多)
基本上,demo.thtml 根本是很複雜,什麼都可以的東西 如下 demo.thtml HTML DEMO PART<BR/> <?php $this->here(); ?> 結果如上我還是成功了 :P my_try.php <?php class Cheat { function here() { //cheat code echo 'test ok<BR/>'; } function Cheat() { require 'demo.thtml'; } } $run=new Cheat;//make it run echo 'pass'; ?> 接下來就要試更完整的了 :P *.thtml 裏還包含 java 語法 我不知道它能不能被執行到 ~^_^~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.59.179.152
文章代碼(AID): #18UU1v_S (PHP)
文章代碼(AID): #18UU1v_S (PHP)