本節視頻15:25處,為什么 url 中沒有加articles的 GET 請求,response 不報錯?
如題。
如果 url 為http://api.com/restful/ ,此時打印$path為空,使用print_r($_SERVER);打印出的信息中,沒有PATH_INFO,報錯Undefined index: PATH_INFO。 為什么老師的不報錯呢?
我回到視頻一開始,restful/index.php只有print_r($_SERVER);查看http://api.com/restful/articles/ 的信息, 其中[REQUEST_URI] => /restful/articles/,而視頻中老師的是完整路徑 http://api.com/restful/articles/ , 請問是為什么?