当我遇到障碍时,我正在阅读官方的 Code Igniter 教程......
tutorial让我保存并运行这段代码:
<?php
class Blog extends Controller {
function index()
{
echo 'Hello World!';
}
function comments()
{
echo 'Look at this!';
}
}
?>
如果我输入以下网址:
index.php/blog
它工作并显示“Hello World!”。
当我修改URL显示评论如下:
index.php/blog/comments/
我得到一个 404。
最佳答案
如果你加一个 ?在 index.php 之后有效吗?
http://example.com/index.php?/blog/comments
关于php - Codeigniter 函数调用 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1665129/