Author |
Message |
21/11/2004 14:52:00
|
Anonymous
|
Hi
I find that I need to parse some PHP code inside one of the templates, but although variables seem to work fine, it will consider anything within <?php ?> tags as comments, as though it had an .html extension or something. I had a look at what the actual php file looked like and I can see why it does this (because it's being stuck in during the parsing and of course the page is parsed once), but is there any way around this?
Thanks
-Oli (cyben@phreaker.net)
|
|
21/11/2004 15:17:40
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
by giving a file the .php extension you are telling the server to pass it to the PHP processor before sending it to the browser. The processor then looks for anything between <?php and ?>. The templates in the guestbook are turned into strings by the guestbook and so the templates are never sent to the processor. To put some php into the templates you will have to do the PHP in the script and have th results turned into a variable which you can then place in the template.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
21/11/2004 15:34:30
|
Anonymous
|
if you need to parse php to have it output in the page, you can put it in the main three files. index.php, addentry.php and comment.php.
|
|
21/11/2004 15:36:29
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
Didn't I just say that?
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
21/11/2004 18:43:13
|
Auron
Expert
Joined: 23/06/2003 22:02:17
Messages: 1053
Offline
|
yeah, but in non-tech speak lol
|
Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought) |
|
21/11/2004 18:51:39
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
Pah.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
21/11/2004 19:03:51
|
Auron
Expert
Joined: 23/06/2003 22:02:17
Messages: 1053
Offline
|
Carbonize wrote:Pah.
HAHAHAAHA!
|
Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought) |
|
|