Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-07-14 18:32:56
- Klikk
- New Member
- Registered: 2006-07-14
- Posts: 9
shtml and #include?
Hi to everyone :-)
Been playing with txp a while now and just starting to know it properly. I’m neither a php/html guru so my appologies if this is a daft question to some of you.
My problem, I need to include a php script that among other things set a cookie. Also want to insert an hourly generated html file.
<head>
#include file=“path/to/some/phpfile”
</head>
<body>
#include virtual=“path/to/some/htmlfile”
</body>
The php script says the output file need to be *.shtml I have tried changing doctype with no luck.
Is this at all doable from within a txp page? Maybe it need to be as a plugin…??
Appriciate all the feedback I can get.
Cheers
Offline
#2 2006-07-14 18:54:25
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: shtml and #include?
Is this at all doable from within a txp page?
That’s not do-able from any PHP page. Use a PHP include:
<txp:php>include 'path/to/some/file';</txp:php>
:)
Offline
#3 2006-07-14 19:12:36
- Klikk
- New Member
- Registered: 2006-07-14
- Posts: 9
Re: shtml and #include?
Mary wrote:
bq. Is this at all doable from within a txp page?
That’s not do-able from any PHP page. Use a PHP include:
<txp:php>include 'path/to/some/file';</txp:php>
:)
——————————
Jippiii, It works! Darn, was it that easy :-) The scripts doc said I needed to use #include file=” bla bla bla bla and change the filetype to shtml.
Thnx a million times :-)
Offline
Pages: 1