runeveryday Posted July 16, 2010 Share Posted July 16, 2010 This is the easiest way to install Smarty. The point is that you need to load the Smarty.class.php file in every PHP file that uses Smarty templates, so if you have it in one folder of the PHP include path, you can create a Smarty instance for it by: <?php require('Smarty.class.php'); $smarty = new Smarty; ?> can't catch up with this part"so if you have it in one folder of the PHP include path, you can create a Smarty instance for it by:..." anyone can explain it for me?thank you Quote Link to comment Share on other sites More sharing options...
trq Posted July 16, 2010 Share Posted July 16, 2010 What is there to explain? If the 'Smarty.class.php' file is within a directory which is on your include_path the above code will include it into your code. Do you know what the include_path is? Take a look at set_include_path & get_include_path. the include path is where you should put any libraries so they are easy to include. 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.