bc Posted September 6, 2009 Share Posted September 6, 2009 I am a newwbie to PHP. I download a PHP+MYSQL app and when I run the app on apache web server on windows as stated in the install file: http://localhost/app I get a folder structure. The app is installed in directory structure c:\approot\app The index .php is present in c:\approot\app\html\index.php How does the app know to pick up the index file from c:\approot\app\html\index.php? Thanks, Link to comment https://forums.phpfreaks.com/topic/173320-indexphp-not-present/ Share on other sites More sharing options...
Stuie_b Posted September 6, 2009 Share Posted September 6, 2009 If i understand you correctly you have installed a script to the app/ folder and when loading it in firefox/IE the script is loading the index file from the html folder.. And you are asking how this achieved?? if so, this can be achieved by a number of methods, the most effective (easiest) is to use the include/require functions within php <?php include('html/index.php'); //Includes the file in the current page and loads the contents require('html/index.php'); //As above but makes php exit if the files does not exist or it cant access. ?> both functions are almost identical in there functions/usage. See here and here for more info If this is Not what you mean, then i dont know what your after.. Stuie Link to comment https://forums.phpfreaks.com/topic/173320-indexphp-not-present/#findComment-913625 Share on other sites More sharing options...
bc Posted September 6, 2009 Author Share Posted September 6, 2009 but there is no index.php in the main app directory? In directory c:\approot\app -- there are no files just folders...so how does the index.php get picked from c:\approot\app\html\index.php Link to comment https://forums.phpfreaks.com/topic/173320-indexphp-not-present/#findComment-913671 Share on other sites More sharing options...
deth4uall Posted September 6, 2009 Share Posted September 6, 2009 Looks like your using a Server Compilation, anything that is in /html will able to be seen, /app/ will be blank it should include system folders for your PHP & MySQL configuration... I use XAMPP myself but thats a personal preference... Link to comment https://forums.phpfreaks.com/topic/173320-indexphp-not-present/#findComment-913676 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.