JustinK101 Posted June 2, 2006 Share Posted June 2, 2006 Hello,I have been coding in PHP + mySQL for a few years now, but recently a buddy of mine told me about the smarty template engine. My projects at work are starting to get large, and I really need a way to make things easiers, faster, and better. Smarty appears to be the answer.We use a shared hosting account which provides php4 and mysql 4. It doesnt give me shell access though. I downloaded Smarty, and I don't really know to intall and use it. I tried following the manual but it wanted me to execute shell commands. Is there any way of installing Smarty on a shared hosting account which doesnt have shell access? There must be.Thanks for any information/tutorials/ or links you can direct my way. Again, I know absolutely 0 about Smarty and I am sure there are others who would like to learn how to use it as well.-- Justin Quote Link to comment https://forums.phpfreaks.com/topic/11062-php-smarty/ Share on other sites More sharing options...
trq Posted June 3, 2006 Share Posted June 3, 2006 I think Smarty is a PEAR package. Although Im sure you could manually upload it, I suggest asking your hosting company wether or not they have PEAR and Smarty installed. Chances are good that they will.You could even try and see for yourself. What does this procduce?[code]echo get_include_path();[/code] Quote Link to comment https://forums.phpfreaks.com/topic/11062-php-smarty/#findComment-41344 Share on other sites More sharing options...
jeremywesselman Posted June 3, 2006 Share Posted June 3, 2006 Smarty IS NOT a PEAR package. And you don't need shell access to use it. All you have to do is download the library, and copy the contents into your directory.1. Download the latest version from [a href=\"http://smarty.php.net/download.php\" target=\"_blank\"]http://smarty.php.net/download.php[/a].2. Copy the contents of the Smarty-2.x.x/libs directory to the folder that you have created in your directory (libs/smarty - just an example).3. To operate correctly, you will need three folders in your main directory. - templates - templates_c - configsThat is basically what you need to get started. But you will definitely read more on actually using Smarty. 'Beginning PHP 5 and MySQL E-Commerce' is what taught me how to work with Smarty. And I actually think that they are publishing a book about Smarty, if it is not already out.If you need anymore help, just post and I'll do what I can to help you with it.[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--] Quote Link to comment https://forums.phpfreaks.com/topic/11062-php-smarty/#findComment-41363 Share on other sites More sharing options...
JustinK101 Posted June 3, 2006 Author Share Posted June 3, 2006 jeremywesselman:When you say download and copy into my directory, do you mean just my root? Because how I have it setup is a have various different PHP/MySQL projects in one hosting accounts, but in their own folders. For example I have a an order management application in folder 'om' and calendar in 'cal' and referral program application in 'referral'. If I just copy the smarty directory into root can I use it everywhere in all my different projects, or do I have to copy smarty into every projects folders and setup every project? Quote Link to comment https://forums.phpfreaks.com/topic/11062-php-smarty/#findComment-41395 Share on other sites More sharing options...
jeremywesselman Posted June 3, 2006 Share Posted June 3, 2006 I'm sure you can just put it in the root directory and use it in all applications, but I haven't tried that. But with the way that I have mine set up, I put a copy in each project folder, because I bury the template_c and configs folder in the library itself because you never really need to use anything in these folders.Give it a shot. And if it don't work, you'll have to put a separate library in each app folder.[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--] Quote Link to comment https://forums.phpfreaks.com/topic/11062-php-smarty/#findComment-41396 Share on other sites More sharing options...
Vikas Jayna Posted June 3, 2006 Share Posted June 3, 2006 You just need to download the Smarty files and put them in a directory anywhere on the disk, even outside the apache's root directory. There is no need of copying the smarty files in each of the application folders. The applications just need to include the Smarty.class.php (by giving the absolute path of this file). Quote Link to comment https://forums.phpfreaks.com/topic/11062-php-smarty/#findComment-41403 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.