|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mcl Smarty n00b
Joined: 18 Dec 2008 Posts: 2
|
Posted: Thu Dec 18, 2008 10:42 am Post subject: NEWBIE: Very confused as to file references |
|
|
I am using a hosted system, where I can ftp files to areas below public_html.
I am assuming I copy the smarty files to public_html/smarty/libs
and then I use
include('MYPrefix' . 'Smarty.class.php');
// create object
$smarty = new Smarty;
but what is 'MyPrefix'
'/smarty/libs/' does not work, do I need some reference to my root ?
What is the best place for the apps smarty files and cache files
public_html/myapp/smarty/*.tpl
public_html/myapp/smarty/cache
I just do not seem to be able to get my head around this and once I crack this I think I will be able to progress quite quickly, so if anyone can help with my above confusion, I would be most grateful.
Richard |
|
Back to top |
|
Celeb Administrator
Joined: 17 Apr 2007 Posts: 1025 Location: Vienna
|
Posted: Mon Dec 29, 2008 8:17 am Post subject: |
|
|
The best way would be to use absolute filepaths. For this you need the file path to your public_html folder. The magic PHP constant __FILE__ should contain that path. _________________ Darn computers always do what I tell them to instead of what I want them to do. |
|
Back to top |
|
mcl Smarty n00b
Joined: 18 Dec 2008 Posts: 2
|
Posted: Mon Dec 29, 2008 9:16 am Post subject: |
|
|
Many thanks - just what I needed |
|
Back to top |
|
Vadi Smarty n00b
Joined: 22 Jan 2009 Posts: 1
|
Posted: Thu Jan 22, 2009 2:54 pm Post subject: |
|
|
Thanks, helped me too. |
|
Back to top |
|
|
|
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
|