Closed Thread Icon

Topic awaiting preservation: Directory mapping problem in PHP Pages that link to <a href="https://ozoneasylum.com/backlink?for=12365" title="Pages that link to Topic awaiting preservation: Directory mapping problem in PHP" rel="nofollow" >Topic awaiting preservation: Directory mapping problem in PHP\

 
Author Thread
Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 08-15-2002 04:45

directory structure examples:

<begin examples>
root/index.php

and

root/scripts/index.txt

and

root/ads/index.php

<end example>

If I link to the index.txt from the index.php in the root it is as follows (source="scripts/index.txt")
but if I am working in "ads/index.php" and want to link to "root/scripts/index.txt" by using
(source="../scripts/index.txt") I get an error...why is this?

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 08-15-2002 05:40

Dunno, but why not use "/scripts/index.txt" or even "$DOCUMENT_ROOT/scripts/index.txt"

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 08-15-2002 06:12

/scripts/index.txt gave me an error...I'll try the environment variable you suggested....didn't know I could use that....Thanks...hope it works!!!

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 08-15-2002 06:22

Well, $DOCUMENT_ROOT would work if you're trying to INCLUDE it. If you're just linking to it, then /scripts/index.txt should work if the file actually exists.

What error are you getting?

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 08-15-2002 06:30

it's one of those "if" statements, like if it can't find it "die"

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 08-15-2002 12:41

(ok, this might be really stupid, but
/index.php
/ads/index.php
but
/scripts/index.txt

could that be your problem? )

Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

posted posted 08-16-2002 03:50

ahhh ha! I found out what the problem was...the mapping was fine. I had a permissions problem on the Apache server. I was using WS_FTP and when I'd CHMOD the txt files it displayed the correct permissions however those permissions were not what the permissions really were as WS_FTP shows what the last setting that u used when you CHMODed last instead of actually querying the file for the current permissions. I refreshed and used 'dirinfo' to determine that the permissions were set wrong and then corrected that and batta bing batta boom everything was copesetic!!!

Thanks all for the suggestions!!!



[This message has been edited by Boudga (edited 08-16-2002).]

« BackwardsOnwards »

Show Forum Drop Down Menu