![]() |
PHP Question
I currently have php includes in my page like the one below...
<?php include ("header.php"); ?> and I'm getting the following error when building my template: Template not saved: Your template currently contains raw PHP code using <? and ?> tags; you should instead use the special {php} or {phpcode} template functions for raw PHP code (see the software manual for details on these template functions) How should it look written properly? Thanks |
Well, this isn't a problem with PHP. It's related to whatever you're using it with. Is this with CPanel or something similar? A software package using Smarty? Need more info. :)
|
Code:
{php} include ("header.php"); {/php} |
Is this TGPX? Looks like it.
|
Smarty in the house.
|
Quote:
Code:
{php} include ('header.php'); {/php} |
Quote:
|
Quote:
|
If you think about security, your code could cause issues though. I would write it this way:
if(!file_exists('header.php')) {die("ERROR MESSAGE HERE");} include ('header.php'); :2 cents: |
Quote:
|
Quote:
|
Quote:
:thumbsup |
All times are GMT -7. The time now is 12:49 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123