Re: [SMARTY-GENERAL] include_php problems
| From: | Monte Ohrt | Date: | Tue, 02 Apr 2002 15:28:40 +0000 |
| Subject: | Re: [SMARTY-GENERAL] include_php problems | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3434@lists.php.net to get a copy of this message | ||
Are you sure you used double quotes? That should interpret the variable value as the file path. Single quotes will not work.
Thomas Meitz wrote:
Yes, this was my first try, that gives me this error: Fatal error: Smarty: [in toplevelnav.tpl line 3]: syntax error: 'file: $nav_path' is not readable in /usr/local/lib/php/Smarty_Compiler.class.php on line 1316 If I've tried this {include_php file='$nav_path'}, I've got the same error. At 09:14 02.04.2002 -0600, you wrote:-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.Ah, try this: {include_php file="$nav_path"} Thomas Meitz wrote:Fatal error: Smarty: [in toplevelnav.tpl line 3]: syntax error: 'file: $this->_tpl_vars['nav_path']' is not readable in /usr/local/lib/php/Smarty_Compiler.class.php on line 1316 Line 3: {include_php file=$nav_path} The value if I print {$nav_path}: /www/htdocs/webserver/portal/functions/system.navigation.php If I use {include_php file="/www/htdocs/webserver/portal/functions/system.navigation.php"} the navigation works.-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc. -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpWhat is the error you get? What is the value if you print {$nav_path} ? Thomas Meitz wrote:Hi everybody, I want to do following in my template file: {assign var="nav_path" value="$portal_functions/system.navigation.php"} {* <== this works *}-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc. -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php{include_php file=$nav_path} {* <== this not *}But all what I've tried gives me smarty errors. Any suggestions? Greets Tom