Forum Moderators: coopster

Message Too Old, No Replies

variables from url

variables from url rnt available for the include_once html parts

         

phutopia

10:19 pm on May 3, 2003 (gmt 0)

10+ Year Member


hi every1, im kinda new to php (started out last week :)

i have this page where i put html snippets with the include_once command into a index.html according to the variable category which i put into the url (?category=1 i.e.) in those snippets i also include php code...which requires this and other variables from the url...

now my problem:
on my local mac (unixbased, yeah) with php version 4.1.2(sytem:Darwin fisheye) everything works out fine...
all variables r available everywhere...

on my webserver with php version 4.2.3 (sytem:linux) that isnt the case. somehow the snippet parts dont get the variables defined in the url..

how come?
is that a speed issue?
or in what order is the code parsed?
is it parsed seperately and then put together with the include_once cmd?

sorry...i know... a lot of text...but any help would be appreciated. tnx a lot! philipp

daisho

11:04 pm on May 3, 2003 (gmt 0)

10+ Year Member



Hello phutopia, welcome to Webmaster World.

If you PHP code is in index.html the problem may be that your webserver does not parse .html files for PHP. Try to rename index.html to index.php.

daisho.

phutopia

7:45 am on May 4, 2003 (gmt 0)

10+ Year Member



thnx...it already is a index.php (i must have been a little bit tired when i wrote this...:)

dmorison

9:37 am on May 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi phutopia,

Doesn't sound right.

Can you try a call to phpinfo() within one of your snippet files and see what the environment looks like...

phutopia

10:20 am on May 4, 2003 (gmt 0)

10+ Year Member



hi every1...

well i found the problem. i included a mySQL db locally which wasnt installed on the live system...no wonder it doesnt work...:)

i told u i am new to php. thnx anyways!

phutopia