看板 PHP 關於我們 聯絡資訊
小弟最近卡關了,上來請教各位前輩 有A B兩個php頁面 A頁面希望去呼叫 B頁面來使用 B頁面中的架構是一些SQL 及class中有含 function ----B頁面裡面的架構---- 一些SQL class xxx extends oooo{ function header(){ } } ---------- 目前想到的作法是將整個B頁面包含在一個function B中來呼叫 雖然有執行完function B,但後來A頁面的程式碼就無法繼續執行下去了 不知道如何改善比較好? 感謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.249.34.133
tkdmaf:先問你知道class中的function代表的意義嗎? 02/19 23:50
DongFeng:為何不require B.php? 02/19 23:58
Fntsr:可能在function B中執行到錯誤的程式或是exit()函式之類的? 02/22 23:31
Fntsr:同2F,方法上直接在A.php require() B.php比較快@@ 02/22 23:33
KawasumiMai:require比較快+1,除非你用Ajax 02/25 15:35