Hi everyone, I have a website that I have been creating using xammp and I have a folder called include that I call on every page which loads my functions and connection variables. I used this code: <?php require_once('includes\connection.php'); require_once('includes\functions.php'); $public = TRUE; ?> PHP: It was all working perfectly on my localhost which is a just a copy of xampp running on my computer. I then uploaded it to the webserver (provided by netfirms.com) and I am getting errors that the require_once function is failing to open the stream. As you can see it is saying that the file or directly dont exist however I have checked the server and the files show with no problems. Any ideas what my problem is? Thanks in advance.
Hi try / instead of \ in the url - \ usually comes before special characters Failing that: - I know it's a dumb suggestion - but first ensure you have actually uploaded them to the right location... - Then check upper/lower case errors - easily done and causes much problems when moving from windows to apache box - After that, try calling the php from the browser - so yourdomain/includes/functions.php etc - check you can access it Hope that helps, Si
Thanks Si, after trying what you said and looking at php.net I found a little piece of code that finds the directory for me and puts the path in. If your interested heres the code: define('__ROOT__', dirname(dirname(__FILE__))); //require_once(__ROOT__.'/config.php); PHP: