2016-09-28 136 views

回答

0

welcome.php控制器是您的默认设置,并且当您未在控制器中声明函数名称时,它会加载index()函数,因此加载http://localhost/antimalarial/将在索引函数中加载欢迎控制器。

但是,如果您要在welcome控制器中加载任何其他功能,则需要提供控制器名称函数名称。

你的链接应该是http://localhost/antimalarial/welcome/fivespecies

+0

我应该提供控制器名称 –

+0

作为菜单项的链接。你链接到:http:// localhost/antimalarial/fivespecies当它应该是http:// localhost/antimalarial/welcome/fivespecies –

+0

Iam sorrry iam有点慢编程请告诉我上述链接的程序 –

0

你可能需要写你的网址为:http://localhost/antimalarial/Welcome/fivespecies

如果此链接不起作用,试试这个: http://localhost/antimalarial/index.php/Welcome/fivespecies 此情况下是有效的,如果你还没有设置.htaccess文件。

如果你想从你的url中删除index.php。请下载并在根目录中添加.htaccess文件。 Click here下载文件。

希望这会有所帮助。

+0

如何删除index.php –

+0

我在答案中添加了.htaccess文件链接。下载该文件并将其粘贴到根目录中。 – Paras

+0

你会发现你的项目名称为“antimalarial”.htaccess文件。每当您设计一个新项目时,只需在.htaccess文件中更改名称即可。 – Paras