By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,751 Members | 1,149 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,751 IT Pros & Developers. It's quick & easy.

Dreamweaver PHP outside document root

P: n/a


I have a website I am trying to develop using PHP and Dreamweaver. I
also have a library of PHP code which includes the username and password
to get in the database.

I would like to put this code outside the document root. (If you are
using Apache, outside of htdocs) The html code can still be in the
document root. But the PHP, I would prefer it not to be. What happens
if some one misconfigures the server, and it no longer recognizes the
..php extension, therefore allowing people to download the script. Or,
if some one figures out the script name and runs the entire .php file?
I don't trust it.

However, the only way dreamweaver will recognize any code as being in
the project, is if it is under the document root. Is there any way
around this?

-d

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Doug schrieb:
I would like to put this code outside the document root. (If you are
using Apache, outside of htdocs) The html code can still be in the
document root. But the PHP, I would prefer it not to be. What happens
if some one misconfigures the server, and it no longer recognizes the
.php extension, therefore allowing people to download the script. Or,
if some one figures out the script name and runs the entire .php file?
I don't trust it.

However, the only way dreamweaver will recognize any code as being in
the project, is if it is under the document root. Is there any way
around this?


Use .htaccess and deny any external access to the configuration file.

Matthias
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.