[英]PhpStorm server using codeigniter
When developing a project using the IDE PhpStorm Codeigniter have the problem that if I do not generate a server does not send me the url of the controller to use the debug port , and if I think it also gives me a server to access failures . 使用IDE PhpStorm Codeigniter开发项目时,存在以下问题:如果不生成服务器,则不会向我发送使用调试端口的控制器的URL,如果我认为它也使我可以访问失败的服务器。 I do not know which is the optimal setting .
我不知道哪个是最佳设置。
http://localhost:63342/U5AP1E2Alex/index.php
(U5AP1E2Alex is the project's folder) It`s OK http://localhost:63342/U5AP1E2Alex/index.php
(U5AP1E2Alex是项目的文件夹)可以
http://localhost:63342/U5AP1E2Alex/index.php/tienda/index
(Function index in controller Tienda) It's KO - 404 Not Found http://localhost:63342/U5AP1E2Alex/index.php/tienda/index
(控制器Tienda中的功能索引)它是KO-404未找到
If I build a Deployment Server I have problems too.. What's better configuration?? 如果我构建一个Deployment Server,我也会遇到问题。什么是更好的配置?
http://www.codeigniter.com/docs http://www.codeigniter.com/docs
1: Check file name has first letter upper case: 1:检查文件名是否具有首字母大写:
Tienda.php Tienda.php
2: Check class name has first letter upper case: 2:检查类名是否具有首字母大写:
<?php
class Tienda extends CI_Controller {
public function index() {
}
}
Make sure your config base url is not empty 确保您的配置基本网址不为空
$config['base_url'] = 'http://localhost:63342/U5AP1E2Alex/';
If your url http://localhost:63342/U5AP1E2Alex/index.php/tienda/
index
then that should go direct to index function no need to have the function index at end of url 如果您的网址
http://localhost:63342/U5AP1E2Alex/index.php/tienda/
索引,
则该网址应直接指向索引函数,而无需在网址末尾添加函数索引
You may need to configure some routes http://www.codeigniter.com/user_guide/general/routing.html 您可能需要配置一些路由http://www.codeigniter.com/user_guide/general/routing.html
$route['tienda'] = 'tienda/index';
Or if in sub folder ie controllers > some_folder > Tienda.php 或者如果在子文件夹中,即控制器> some_folder> Tienda.php
$route['tienda'] = 'some_folder/tienda/index';
UPDATE: 更新:
If you do not need index.php in url then I suggest you remove it by making this blank like below. 如果您不需要url中的index.php,那么建议您将其空白,如下所示将其删除。
$config['index_page'] = '';
And adding a htaccess file in your main directory. 并在您的主目录中添加htaccess文件。 Some htaccess Examples
htaccess的一些例子
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.