|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
abadger Smarty n00b
Joined: 25 Jan 2014 Posts: 1
|
Posted: Sat Jan 25, 2014 8:06 am Post subject: Upgrade to Smarty 3.1.16 ..do I need to make files lowercase |
|
|
Advice needed on upgrade to 3.1.16 .. have trouble understanding how to change my current autoloader ....currently get errors like:-
[25-Jan-2014 15:08:58 Europe/London] PHP Fatal error: require_once(): Failed opening required 'Smarty_Internal_TemplateCompilerBase.php'
and my loader looks like...
function autoload_class($class_name)
{
$file = $class_name. '.php';
require_once($file);
}
spl_autoload_register('autoload_class'); |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Jan 25, 2014 6:42 pm Post subject: |
|
|
Smarty does register it's own autoloader. Your autoloader is not compatible to multiple loaders. It should test if the file exits.
Code: | function autoload_class($class_name)
{
$file = $class_name. '.php';
if (file_exits($file)) {
require_once($file);
}
} |
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|