![](/img/trans.png)
[英]urldecode() and rawurldecode() working locally but not on live server
[英]Working locally to prepare for live server
我将在本地开发一个新的Codeigniter应用程序。 我对应该使用的正确文件结构感到好奇,这有助于遵循正确的最佳实践。 我没有更改MAMP内的默认根目录。 我想要做的是设置好,这样当我准备好上载到实时站点时,无需执行任何其他操作,它就可以正常工作。 我确实配置了index.php文件,以便它显示系统和应用程序文件夹的正确位置。 站点一是主站点。
现在我有这个:
本地
/MAMP
/htdocs
/sites
/site1
/system
/application
/public_html
index.php
/site2
/system
/application
/public_html
index.php
/site3
/system
/application
/public_html
index.php
生活
/root
/application
/dev
/site1
/application
/system
/public_html
index.php
.htaccess
/site2
/application
/system
/public_html
index.php
.htaccess
/sites
/site3
/application
/system
/public_html
index.php
.htaccess
/site4
/application
/system
/public_html
index.php
.htaccess
/public_html
/public_html
/assets
/css
/js
/images
index.php
.htaccess
/system
CodeIgniter在根文件夹index.php中具有一个环境变量,您可以将其设置为确定系统是生产环境还是开发环境。 这是路由所有传入请求的index.php。
为您的开发计算机设置此环境变量,并为实时服务器设置一个单独的文件。
在application / config中,您可以将单独的生产和开发配置文件存储在与环境变量相同的文件夹下。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.