Jump to content

Php, security question


Taxa

Recommended Posts

Nope, you can't download the source code for a PHP file, because it runs on the server and produces HTML output.

 

But I also have this in my .htaccess file

 

<files db.php>
order deny,allow
deny from all
</files>

 

And, if you're still a bit worried, you could place it below the web root, i.e. instead of /var/www/db.php place it under /user/yourname/db.php and call it using

 

<?php

require('/user/yourname/db.php');

?>

 

I think that's right anyway

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.