|
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 |
astroboy Smarty n00b
Joined: 22 Jul 2003 Posts: 4
|
Posted: Tue Jul 22, 2003 8:12 pm Post subject: Diectory setup |
|
|
In the example setup given in installation chapter of the Smarty Guide, the Smarty lib files are outside the document root, but the template, config and cache directories are in the doc root. I'd like to keep everything out of doc root if possible. Is there any foreseeable problems with doing this? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Tue Jul 22, 2003 10:07 pm Post subject: |
|
|
no there aren't any problems to expect. it's good to keep all unnecessary stuff outside of the docroot.
i think it's below the docroot in the examples for simplicity so relative paths to index.php work as expected with default-settings.
it's overall a good idea to configure smarty to have absolute paths to plugins, templates and templates_c and to only expose index.php and the like to the web. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Tue Jul 22, 2003 10:57 pm Post subject: |
|
|
The only forseeable problem is if you use a wysiwyg HTML editor. When editing a template (outside of your webroot) that has a relative link to an image file (inside of your webroot) your editor will complain or simply not show you the image.
There are many workarounds, including several listed on this site. The simplest thing is to copy your webs imagedir to a place relative to your template dir for development purposes.
The best thing is probably to maintain several environments with your development environment being less stringent than the production environment.
Otherwise, as messju says (and as you obviously know), it is best to keep the minimum required in your webroot. |
|
Back to top |
|
astroboy Smarty n00b
Joined: 22 Jul 2003 Posts: 4
|
Posted: Tue Jul 22, 2003 11:10 pm Post subject: |
|
|
Hey, thanks guys |
|
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
|