Closed Thread Icon

Preserved Topic: fopen... php files (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=21227" title="Pages that link to Preserved Topic: fopen... php files (Page 1 of 1)" rel="nofollow" >Preserved Topic: fopen... php files <span class="small">(Page 1 of 1)</span>\

 
Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 08-07-2002 07:36

I'm writing an edit tool that is supposed to open up a file, take the stuff in that file and put it into a textbox where it can be edited. Then that text is passed on to be saved into the file again. At least thats what it should do... and will, except for one problem...

When the file is a php file, the server compiles it first. So instead of getting the php file, I get the html output that the php file creates when run. How can I get the whole, uncompiled PHP file into the textbox???

--Lurch--

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 08-07-2002 08:07

I guess that you're passing URL to fopen() function and that's why you get the output and not the PHP code. Instead of using URLs, you should use local unix paths (i.e. /home/www/html/blah.php)...


Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 08-07-2002 08:27

doh!!!

hehe thanks Mr. Max

Whole site is sitting on my machine, (winXP, apache)... so its not where it will be (or even on the same type of system) when its up on the client's server. pain in the but sometimes, but thats why i'm using a config file with all the server settings like the docroot, etc..

--Lurch--

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 08-07-2002 08:47

You probably didn't know this, in PHP there's a predefined variable $DOCUMENT_ROOT, which holds server's document root path...


Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 08-07-2002 09:15

i did.. just wasn't thinking... thanks Max

--Lurch--

CRO8
Bipolar (III) Inmate

From: New York City
Insane since: Jul 2000

posted posted 08-08-2002 20:09

Lurch

On a side note, "Lurch" was my rugby name in College. Oh memories. . .


CRO8

Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 08-08-2002 22:49

it was my Soccer nickname in school

--Lurch--

mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 08-08-2002 22:57

Where did you play rugby? and when?

I played in college from '94 - '99 and now coach a local high school team.

my mom was sure proud to know she had a hooker for a son.

mobrul

CRO8
Bipolar (III) Inmate

From: New York City
Insane since: Jul 2000

posted posted 08-09-2002 21:56

I played at Ithaca College in update New York. 1992-1996. Through the years I played Locke, then Fullback, then 8 man, then Inside, back to 8 man my Senior year.

Nothing like a good old Father Abraham song to lift the spirits!

CRO8

« BackwardsOnwards »

Show Forum Drop Down Menu