View Full Version : include a php file
sitbyme
09-04-2006, 12:28 AM
I'm sure in time I'll catch on tpl files but not yet.
Iwant to include a php file into my directory right above the bottom center banner. It is a media player and resides in directory light3s/wimpy.php which is in the same line as the templates directory. it is the green leaves template.
I tried putting an include on line 1 of the footer tpl as it appers the banner is on line 1 and I moved it down to 3 but i keep getting can't find no such directory etc
Any help out there?
thanks
Sit
Dave Baker
09-04-2006, 07:09 PM
Hello sitbyme,
If you want include php file in tlp file you can use the following function:
{include_php file="/light3s/wimpy.php"}
"light3s/wimpy.php" - should have location in the root of directory (not in template directories)
sitbyme
09-04-2006, 09:34 PM
Dave
Thanks for the info but i still can't get it to work.. here s=is the error, at least I'm putting it in the correct place :)
Warning: Smarty error: file:../../light3s/wimpy.php is not readable in /***/www/***/******/snapjazz/smarty/Smarty.class.php on line 1095
Warning: _include(): Failed opening '' for inclusion (include_path='.:/usr/local/lib/php') in /***/www/*****/*******/snapjazz/smarty/Smarty.class.php on line 1925
Dave Baker
09-04-2006, 10:56 PM
Sitbyme you should specify absolute path to file. If security is enabled, then the php script must be located in the $trusted_dir path. Path to the included php file -- relative to $trusted_dir or absolute path.
sitbyme
09-07-2006, 10:32 PM
Dave
Thanks for all your help.. I used an absolute path to a file not in the template files but in a directory in the root and still keeps telling me the file is not readable..
white flag is up and I give up... funny that in the ten years I have been doing things in websites things have not really gotten simpler but more complicated.. oh well such is life.
Thanks again
Dave Baker
09-08-2006, 05:25 PM
sitbyme, if you have opportunity, send this file to me by mail I will try to realize it on my local copy. I will try to find ways of the decision of your problem.
dbaker@esyndicat.com
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.