As I know, the root folder for a codeigniter app is set in "ci.php" with the $application_folder
variable.
Is it possible to change this variable dynamically ?
For example at at some point, in some controller, I want to switch the root dir from "main_root" folder to "another_root" folder ?
The application folder is set in the index.php, for example:
$application_folder = '../application';
That is the best place to change it dynamically.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.