Closed Thread Icon

Topic awaiting preservation: security question Pages that link to <a href="https://ozoneasylum.com/backlink?for=11994" title="Pages that link to Topic awaiting preservation: security question" rel="nofollow" >Topic awaiting preservation: security question\

 
Author Thread
JKMabry
Maniac (V) Inmate

From: out of a sleepy funk
Insane since: Aug 2000

posted posted 01-13-2002 04:06

you know your absolute server path? /home/machine/user/domain.com or whatever?

I have a PHP script that is looking into a directory and pulling files from there and stuffing links into a combo box, the links are as the path above. It works but is it a good idea? How to make it give a different path for the link if it's bad practice?

grazi

Jason

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 01-13-2002 10:08

what is your problem/what are you trying to do?

as you can only run listing from /home/machine/user/domain.com and up, just suppress the base folder from being displayed, and when you want to process the path re-append the base path,

so:
$basepath= '/home/machine/user/domain.com'
and the links and values are like:
index.htm , images/spacer.gif, etc....

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 01-13-2002 14:16

No not a good idea.

You are just showing people path info that they don't need to know. This opens up some security issues which may allow hackers access to find data and info easier.

lallous' suggestion is best



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 01-13-2002 17:32

actually, $DOCUMENT_ROOT should point to your root doc folder. You can just append that. This makes it easier if you ever move the site to another server with a different folder structure. So, use something like
"$DOCUMENT_ROOT/scripts/script.php", and that would point to "/home/machine/user/domain.com/scripts/script.php"

JKMabry
Maniac (V) Inmate

From: out of a sleepy funk
Insane since: Aug 2000

posted posted 01-14-2002 00:45

excellent, cookies all round, thanks

Jason

« BackwardsOnwards »

Show Forum Drop Down Menu