Dear All,
What is the purpose of htdocs folder in apache and why should we place our php files in htdocs
regards,
b.v.suresh babu
Dear All,
What is the purpose of htdocs folder in apache and why should we place our php files in htdocs
regards,
b.v.suresh babu
the DocumentRoot is the location of your website files. for example I have a url
http://www.site.com
and that pulls up a page index.htm or index.php so it would reside in
http://www.site.com/index.htm
so those webfiles need to reside somewhere on the server and that is your DocumentRoot which could be
/www/site.com/htdocs/index.htm
that means that anything in the htdocs folder is accesible via the web browser unless you setup different permissions etc.
so you would want your php files in the htdocs folder so they can be accessed.
now if you have files with info you don't want exposed to the web browser directly, you could put in in another file up a level
/www/site.com/private/includefile.php
and you could use that file by using an include.
Dear Friends,
Your explanation is really excellent and helpful
regards,
bvsureshbabu