在thinkPHP3.0中,代碼如echo "hello ThinkPHP !";頁面顯示 “hello ThinkPHP !hello ThinkPHP ! ”兩次輸出
原因ThinkPHP3.0以上的版本不在使用App::run()。從ThinkPHP2.0升級後沒有刪除App::run() 導致二次輸出。
將入口文件中的App::run()刪除即可解決
在thinkPHP3.0中,代碼如echo "hello ThinkPHP !";頁面顯示 “hello ThinkPHP !hello ThinkPHP ! ”兩次輸出
原因ThinkPHP3.0以上的版本不在使用App::run()。從ThinkPHP2.0升級後沒有刪除App::run() 導致二次輸出。
將入口文件中的App::run()刪除即可解決
1.Select 查詢語句 佔位方式一 //sql 查詢語句 佔位方式一 $sql = "select * from tp_articles where id =?"; $result =