Jump to content

index.php not present


bc

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.