Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

PHP Autoload doesnīt work in Plugin

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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: 82
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:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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