Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-01-2012, 07:48 PM   #1
SlammedMedia
Confirmed User
 
Industry Role:
Join Date: Apr 2008
Posts: 1,573
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
__________________
ICQ: 350-260-628
SlammedMedia is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-01-2012, 07:54 PM   #2
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
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.
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-01-2012, 07:55 PM   #3
Voodoo
♥ ♦ ♣ ♠
 
Voodoo's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
Code:
{php} include ("header.php"); {/php}
Try this. I'm not 100% on it though. I don't know what template engine you're using.
__________________

"I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
Voodoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-01-2012, 07:55 PM   #4
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
Is this TGPX? Looks like it.
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-01-2012, 07:55 PM   #5
19teenporn
Confirmed User
 
19teenporn's Avatar
 
Industry Role:
Join Date: Apr 2011
Location: En la reverendisima concha de tu madre!
Posts: 3,034
Smarty in the house.
19teenporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-01-2012, 07:58 PM   #6
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
Quote:
Originally Posted by Voodoo View Post
Code:
{php} include ("header.php"); {/php}
Try this. I'm not 100% on it though. I don't know what template engine you're using.
This is correct, if you're using TGPX. Single quotes are preferred for this instance, so:

Code:
{php} include ('header.php'); {/php}
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-01-2012, 07:58 PM   #7
Jacob[Soft]
Confirmed User
 
Jacob[Soft]'s Avatar
 
Industry Role:
Join Date: Mar 2010
Location: http://HardLinks.ORG http://HardLinks.ORG http://HardLinks.ORG http://HardLinks.ORG http://HardLinks.ORG http://HardLinks.ORG
Posts: 873
Quote:
Originally Posted by edgeprod View Post
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.
agree, nothing to do with php, can you write in detail what you were doing and maybe post some screens, providing that we can help you.
__________________
Jacob[Soft] is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-01-2012, 07:59 PM   #8
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
Quote:
Originally Posted by Jacob[Soft] View Post
agree, nothing to do with php, can you write in detail what you were doing and maybe post some screens, providing that we can help you.
It's TGPX. Just confirmed it on ICQ. I had a hunch.
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-02-2012, 12:54 AM   #9
CHMOD
Confirmed User
 
CHMOD's Avatar
 
Join Date: Jun 2003
Posts: 1,697
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');

__________________
Sell our Silicone Dolls and make big money!

Our website:
https://www.sexdolls-shop.com/

Signup:
http://www.sexdollscash.com/sliiing/registration.php

Contact:
[email protected]
CHMOD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-02-2012, 01:04 AM   #10
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
Quote:
Originally Posted by CHMOD View Post
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');

Yeah, we addressed that through ICQ, and got rid of the includes, haha.
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-02-2012, 01:40 AM   #11
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,383
Quote:
Originally Posted by SlammedMedia View Post
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
It's because you are trying to insert your PHP code into a smarty template. Read this: http://www.smarty.net/docsv2/en/language.function.php
__________________
Obey the Cowgod
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-02-2012, 02:39 AM   #12
CHMOD
Confirmed User
 
CHMOD's Avatar
 
Join Date: Jun 2003
Posts: 1,697
Quote:
Originally Posted by edgeprod View Post
Yeah, we addressed that through ICQ, and got rid of the includes, haha.

__________________
Sell our Silicone Dolls and make big money!

Our website:
https://www.sexdolls-shop.com/

Signup:
http://www.sexdollscash.com/sliiing/registration.php

Contact:
[email protected]
CHMOD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.