Guest ziemowit Posted May 22, 2011 Report Share Posted May 22, 2011 Hi, I wasn't sure where to post it, but I hope here's ok. I've followed killersites advanced php tutorials and ended up with a nice foundation for an mvc app. I thought I understood everything covered in that course, but I was wrong . I wanted to add Smarty to my app, but can't instantiate a smarty object, because I fail to include the smarty class properly. As instructed on smarty website you would do this by 'require' before creating the object. However since my app has that neat set_include_path mechanism I thought I could just add smarty to it. The way it supposed to work was - add smarty class to included paths, instantiate smarty object in the render function of controllerabstract class, and pass some parameters from child controllers action methods. The problem is, when I create the object by <<$smarty = new Smarty(); >> I get an warning message saying that the Smarty class was not found. I must do something wrong because it also says that it looked for it in the controllers folder, or perhaps in that namespace and not in sites root folder. I hope someone who's familiar with the tutorial could help me. Maybe I should instantiate that object differently. Any hints are welcomed. Quote Link to comment Share on other sites More sharing options...
grabenair Posted June 13, 2011 Report Share Posted June 13, 2011 If that is the exact code try no spaces and $newSmarty Just for you know I am not the efficient in php but I would try that first. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.