|
|||||||
![]() |
Forum Index > glFusion > glFusion Support |
|
|
Static Page query
|
|||
| | | Printable Version |
|
bisdak | ||||||||
|
I want to add the following line to some staticpages PHP Formatted Code <?php require_once ('count.php'); ?>
PHP Formatted Code <!-- ?php require_once ('count.php'); ? -->
Tita T |
![]() Active Member Group Comfort Level:: +6 ![]() ![]()
Registered: 08/14/09 |
||||||||
|
|||||||||
|
bisdak | ||||||||
|
Before posting my query I had read the other forum posts regarding php in static pages none of the advice helped or solved the query I had, hence my posting. PHP Formatted Code [counter:%0%] as the first line in the static page it does seem to work which is suppose all I can ask - if there is a better solution please post so I can implement it. Tita T |
![]() Active Member ![]() Group Comfort Level:: +6 ![]() ![]()
Registered: 08/14/09 |
||||||||
|
|||||||||
|
lgarner | ||||||||
|
As I recall, when "execute PHP" is on in a static page it is all treated as PHP. I think you need to close the PHP tag, or omit the opening tag if PHP is your first item. For instance: PHP Formatted Code ?> Some non-php textgoes here. <?php echo $counter;?> Some more text, now to re-open PHP at the end <?php |
![]() Admin Group Comfort Level:: +51 ![]() ![]()
Registered: 06/10/08 |
||||||||
|
|||||||||
|
bisdak | ||||||||
|
Thanks Lee will give it a try as PHP Formatted Code require_once '../count.php'; ?>
Tita T |
![]() Active Member Group Comfort Level:: +6 ![]() ![]()
Registered: 08/14/09 |
||||||||
|
|||||||||
|
bisdak | ||||||||
|
Lee it prints the line on screen could it be something to do with Advanced Editor and that is changing the syntax of the line. it is putting a "<p>" in front of the line and the same behind. Tita T |
![]() Active Member Group Comfort Level:: +6 ![]() ![]()
Registered: 08/14/09 |
||||||||
|
|||||||||
|
Mark | ||||||||
|
You can't use the advanced editor to embed PHP code. The advanced editor is designed to take what you type and display it, so it will translate <? to >?. You must use the text HTML editor when you want to embed PHP code into a static page. glFusion - Enhanced Content Management |
![]() Admin Group Comfort Level:: +104 ![]() ![]()
Registered: 10/21/05 |
||||||||
|
|||||||||
|
bisdak | ||||||||
|
That answers that so I best stick with my Q&D autotag fix as it seems to work - win some lose some. Tita T |
![]() Active Member Group Comfort Level:: +6 ![]() ![]()
Registered: 08/14/09 |
||||||||
|
|||||||||
|
| All times are CDT. The time is now 01:31 am. |
|
|