I want to include a php-file in my template. But sometimes the php file is not exist. I try to check it by function "file_exists", but it doesn't work.
{if file_exists("`$plugin`/button.php")}
{include_php "`$plugin`/button.php"}
{/if}
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:/home/user/www/site/template/template.tpl" on line 456 "{include_php "
$plugin/button.php"}" {include_php} file '/button.php' is not readable <-- thrown in /home/user/www/site/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 456
Is there any way to check if a php file exists?
it works ok in file pathbut in the question you writebut it doesn't work.. Which is it? - Andreas