I have the following directory structure where the Document Root is pointed to /var/www/html/public:
I am trying to use the following code to check if a file exists inside a file in the /public directory (working on local setup, but not on live server)
<?php
if (file_exists('../application/controllers/TestController.php'))
{
/* do something */
}
Could there be something in the Apache config file the I need to add? I am not sure where to go from here.
So the real problem that I found was that on my live server, the file name did not change when I renamed it to lowercase (APIController => ApiController). Even though the change happened locally, my GIT commit did not rename the file properly when the code was committed.
Sorry for the confusion!