ThinkPHP學習筆記(四)--通過完整域名訪問自定義函數

在「application」文件夾下新建「sample」文件夾,再在「sample」文件夾下新建「controller」文件夾 ​ 在「controller」文件夾下新建一個Test類,如下: 然後再Test.php文件中添加以下代碼: 再通過瀏覽器訪問「http://localhost/public/index.php/sample/test/hello」即可正常訪問自定義函數
相關文章
相關標籤/搜索