thinkphp學習 入口檔案 1

2021-06-20 13:40:31 字數 617 閱讀 5791

在達內培訓的時候是學過thinkphp的,並在老師的帶領下,也是應用這個框架做過專案的,但畢竟自己沒有用心,後來參加工作,是做的ecshop的二次開發,大部分的工作是對公司的後台**進行維護,本人太安逸了,不想動腦去學習未知的,覺得太費腦,結果這次面試給人的印象就是白白的有兩年的工作經驗,但實際上懂得東西不多,不愛鑽研,俗話說,亡羊補牢,還不晚,從現在起,好好學習,邊學習,然後在這個過程中,做乙個專案,當別人再問我的時候,就不會無話可講嘍

thinkphp的入口檔案的載入

建乙個要做的web專案,比如我的tp_now

將資料夾thinkphp整個複製到web專案中

在web專案下建乙個入口檔案index.php,裡面寫這樣一句程式,require('../tp_now/thinkphp/thinkphp.php');

位置是這樣的

就這麼乙個簡單的入口檔案,折騰了半天,因為將index.php放到了thinkphp資料夾內,結果就報錯:cannot declare g() in common.php ------------

雖然就是乙個簡單的入口檔案,我希望能記錄下成長的每一步

thinkphp學習筆記2 入口檔案

在thinkphp中有兩個入口檔案,乙個是專案的入口檔案,是index.php在主目錄裡面,還有乙個是thinkphp框架的的入口檔案,放在框架目錄下面如 d thinkphp thinkphp,名字是thinkphp.php。thinkphp採用的是單一入口模式,所有的程式都是從專案入口檔案開始執...

Thinkphp 基礎 入口檔案

thinkphp採用單一入口模式進行專案部署和訪問,無論完成什麼功能,乙個應用都有乙個統一 但不一定是唯一 的入口。應該說,所有應用都是從入口檔案開始的,並且不同應用的入口檔案是類似的。入口檔案主要完成 預設情況下,框架已經自帶了乙個應用入口檔案 以及預設的目錄結構 內容如下 require thi...

thinkphp3 2入口檔案

define dir secure filename default.html 錯誤頁面 專案路徑 require thinkphp thinkphp.php 引用檔案 專案路徑 require thinkphp thinkphp.php 引用檔案 專案路徑 require thinkphp thi...