Lambneck Posted October 11, 2008 Share Posted October 11, 2008 I don't get it... http://www.phpfreaks.com/tutorial/php-security/page5 what is public_index.php? <?php require '../public_index.php'; ?> if public_html is the root then how can public_index.php be outside it? /application /controllers /models /views /library /public_html <-- document root /index.php /media /images /javascript /css /config /cache /tmp /public_index.php /logs i confused! ??? Quote Link to comment https://forums.phpfreaks.com/topic/127969-solved-security-tutorial-outside-file-access/ Share on other sites More sharing options...
waynew Posted October 11, 2008 Share Posted October 11, 2008 public index is just an example page Quote Link to comment https://forums.phpfreaks.com/topic/127969-solved-security-tutorial-outside-file-access/#findComment-662651 Share on other sites More sharing options...
.josh Posted October 11, 2008 Share Posted October 11, 2008 Yes, it is an example page. And it is outside of /public_html. /public_html is not the root, it's a directory in the root. public_index.php is also in the root, but not in the /public_html directory (or any subdirs of it), hence, it's outside the directory. /public_html is the "root" as far as the outside world is concerned, but it is not the root directory of the server. Quote Link to comment https://forums.phpfreaks.com/topic/127969-solved-security-tutorial-outside-file-access/#findComment-662674 Share on other sites More sharing options...
Lambneck Posted October 12, 2008 Author Share Posted October 12, 2008 Ok, but what is IN public_index.php? Do you have to require it in all public_html/pages? Quote Link to comment https://forums.phpfreaks.com/topic/127969-solved-security-tutorial-outside-file-access/#findComment-663102 Share on other sites More sharing options...
.josh Posted October 12, 2008 Share Posted October 12, 2008 it doesn't matter what is in public_index.php. You can have whatever you want in it. People usually keep stuff like db connection info in it and then include or require it in some other x.php script that is in public_html directory. Quote Link to comment https://forums.phpfreaks.com/topic/127969-solved-security-tutorial-outside-file-access/#findComment-663129 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.