Why is it advisable to place scripts which contain details of your
login and password outside of the publicly accessible web area on your
server.
Surely if the files that contain the details are given a php extension
then no-one can get at the information contained by these files even
if they point their browsers directly at the correct named file,
because apache will parse the php file before it is sent.
i.e.
if the file is called options.php and it resides in the web root
directory and contains the following ;-
<?php
define('DBUSER' , 'Username') ;
define('DBPASS' , 'Password123') ;
?>
If a web user points their browser directly at this page they will
just get a blank page - is there another way of gaining access to the
contents of this file that I am overlooking ?
tia
smartbloke
login and password outside of the publicly accessible web area on your
server.
Surely if the files that contain the details are given a php extension
then no-one can get at the information contained by these files even
if they point their browsers directly at the correct named file,
because apache will parse the php file before it is sent.
i.e.
if the file is called options.php and it resides in the web root
directory and contains the following ;-
<?php
define('DBUSER' , 'Username') ;
define('DBPASS' , 'Password123') ;
?>
If a web user points their browser directly at this page they will
just get a blank page - is there another way of gaining access to the
contents of this file that I am overlooking ?
tia
smartbloke
Comment