ala888 Posted July 9, 2014 Share Posted July 9, 2014 Is it possible to open up a php file in a sub directory of root without specifically setting it as a destination; but rather, only referencing the folder it is in ? Similar to how, index.html, opens automatically when viewers visit the home page - despite it never being explicitly called. Link to comment Share on other sites More sharing options...
justsomeguy Posted July 9, 2014 Share Posted July 9, 2014 If you're talking about filesystem functions like fopen or file_get_contents, then no, that's not possible. Link to comment Share on other sites More sharing options...
ala888 Posted July 9, 2014 Author Share Posted July 9, 2014 No that's not what I meant. lets say my directory looks like this root/ index.php anotherlink/ anotherlink.php how do I make it so that anotherlink.php opens automatically upon calling "www.domain.com/anotherlink/ Link to comment Share on other sites More sharing options...
justsomeguy Posted July 9, 2014 Share Posted July 9, 2014 You have to configure the web server to use "anotherlink.php" as one of the possible default documents. Link to comment Share on other sites More sharing options...
ala888 Posted July 9, 2014 Author Share Posted July 9, 2014 (edited) this is in apache right? nvm, thanks Edited July 9, 2014 by ala888 Link to comment Share on other sites More sharing options...
Don Jajo Posted July 10, 2014 Share Posted July 10, 2014 Or set this in the directory .htaccess file DirectoryIndex anotherlink.php 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