Reputation: 320
I have a PHP file in my local machine where I require some files in previous folders like this
"require_once("/../function_collection/pagination_functions.php")"
it works perfectly on my local machine using WAMPP, but when i put this exact same line on my codes on the live server it throws a 500 error. What could I be doing wrong? and I have uploaded all neccessary files and folders.
Upvotes: 1
Views: 37
Reputation: 631
require_once("/../function_collection/pagination_functions.php");
if its one directory up:
require('../function_collection/pagination_functions.php');
or use the full path, i.e.
require('/path/to/function_collection/pagination_functions.php');
Hope that helps!
Upvotes: 1