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 Link to comment https://forums.phpfreaks.com/topic/207914-cant-understand-this/ 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. Link to comment https://forums.phpfreaks.com/topic/207914-cant-understand-this/#findComment-1086902 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.