![](/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.