Getting Started with CodeIgniter 4 PreAlpha 1 |
I have used CI for quite some time and created all localhost files to be a mirror image of the onsite files. This was done by creating the following constant:
PHP Code: defined('LOCALHOST') || define('LOCALHOST', 'localhost'===$_SERVER['SERVER_NAME']); Differences such as paths, adverts, display Analytics, etc could then be switched out locally using the following: PHP Code: if( ! LOCALHOST): I tried using this method with the CI4 installation and the class namespace created problems I eventually managed to find a solution by using the following: .htaccess Code: # Sets the environment that CodeIgniter index.php PHP Code: # SetVar Constants MUST BE SET IN .htaccess These two files require modifing: ./Config/App.php PHP Code: # public $systemDirectory = '../system'; ./Config/Paths.php PHP Code: public $publicDirectory = CI_PUBDIR ; // 'public'; // public'; Using this technique gives peace of mind knowing that any file modified locally will not create problems when uploaded. I have just used the above method and the installation worked first time! I was wondering if this could be applied to the current CI4 installation? |
Welcome Guest, Not a member yet? Register Sign In |