Jump to content

[SOLVED] document root


asmith

Recommended Posts

i've read to put sql and other important information outside of the document root a few  times.

for achiving this i only need to put ../  ?  like :    http://www.domain.com/../password.php

?

can't a user just type  http://www.domain.com/../password.php in a download program and get it ?

or i got whole wrong ?

(sorry , i know it is not a full php question)

Link to comment
https://forums.phpfreaks.com/topic/80241-solved-document-root/
Share on other sites

I've often wondered this too. I used sessions to check whether a user was logged in as an admin when they tried to guess a URL and then redirected to login.php if they wern't logged in.

 

There surely will be a better option though. SSL sites must have some kind of method to stop this.

Link to comment
https://forums.phpfreaks.com/topic/80241-solved-document-root/#findComment-406704
Share on other sites

ok .

so no configure needed,

another thing,

is this needed to do such coding :

 

<?php
$a = true;
include("../security.php");

security.php

<?php
if (!isset($a))
{exit;}


// the codes 

unset($a);

 

 

i mean this way for preventing someone to access security.php individually .

but as talking about the path outside the root ,

is that nessery now ?

 

Link to comment
https://forums.phpfreaks.com/topic/80241-solved-document-root/#findComment-406724
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.