Where to set CI_ENV for CI methods executed via cron? |
You do not need to do anything to index.php as suggested by spjonez. Index.php already looks at $_SERVER['CI_ENV'] and responds accordingly.
As InsiteFX suggested set .htaccess like this Code: #Set the CodeIgniter Environment. So a command along the lines ought to work. ... php full/path/to/html/root/index.php controller method arg1 argn The big thing you have to assert is that your server has the env module up an running. It is often not on in shared hosting situations. |
Welcome Guest, Not a member yet? Register Sign In |