![]() |
php includes and smarty
I placed this code on home.tpl:
{include file="/home/mags/public_html/ecommerce/myphp/welcome.php"} And received this warning: Warning: Smarty error: unable to read resource: ""/home/10/public_html/ecommerce/myphp/welcome.php"" in /home/mags/public_html/ecommerce/Smarty-2.6.3/Smarty.class.php on line 1082 And this: {php} include "/home/10/public_html/ecommerce/myphp/welcome.php"; {/php} And this: <?php include("/home/10/public_html/ecommerce/myphp/welcome.php"); ?> And this: <?php include("/home/10/public_html/ecommerce/myphp/welcome.inc"); ?> And only the code appeared on the page. What am I doing wrong? |
In your welcome.php
Do you have php tags at the start and finish? Code:
<? |
It looked like this:
<?php # # You can place your php here for the WELCOME PAGE of your site # $the_welcome="hello"; echo $the_welcome; ?> <html> <body> </body> </html> The I tried: <?php # # You can place your php here for the WELCOME PAGE of your site # $the_welcome="hello"; echo $the_welcome; <html> <body> </body> </html> ?> An received this error: Parse error: parse error, unexpected '>' in /home/10/public_html/ecommerce/myphp/welcome.php on line 10 |
Hi try this
Code:
{php} In welcome.php Code:
<? |
All times are GMT -8. The time now is 07:28 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.