Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
PHP Autoload doesnīt work in Plugin

 
Post new topic   Reply to topic    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
Majiy
Smarty Rookie


Joined: 22 Apr 2009
Posts: 8

PostPosted: Fri Feb 26, 2010 10:35 am    Post subject: PHP Autoload doesnīt work in Plugin Reply with quote

In my website, I use an autoload function to include class-files when needed. I define this autoload function BEFORE including smarty.

The auto-loading works in regular php files.

I try to use one of the should-by-autoloaded classes in a smarty plugin, but I get the error message "Fatal error: Class 'xxx' not found in .../Smarty-2.6.26/plugins/function.load_menu.php on line 21"

The __autoload function is actually NOT called at this point.

I canīt find the reason for this, can somebody please give me a hint what the actual reason for this problem might be?

Help is highly appreciated.
Back to top
View user's profile Send private message
ovnn
Smarty Regular


Joined: 14 Apr 2010
Posts: 78
Location: Germany

PostPosted: Tue Aug 10, 2010 10:44 am    Post subject: Reply with quote

to solve this Problem. The include of Smarty.class.php must bevor you define your own autoload function
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP