aleksanteri Posted October 12, 2006 Share Posted October 12, 2006 Say I've got a library PHP file at a folder and I've got an index.php in a folder that is the subfolder of the folder with the library in it. Now I want to use include() to get the library file into the index.php file without being jumped to the main root folder. Is this possible and how do I do it? Link to comment Share on other sites More sharing options...
jesh Posted October 12, 2006 Share Posted October 12, 2006 Haven't used PHP in awhile, but this should pull the file from the parent directory: include('../library.php'); And this should pull it from the root directory: include('/library.php'); Link to comment Share on other sites More sharing options...
aleksanteri Posted October 12, 2006 Author Share Posted October 12, 2006 Works Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now