Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- DJ Majestik
March 3, 2005, 1:50 am
rate this thread
OK, I am new to the whole PEAR/Smarty templating thing. I am trying to
setup my directory structure correctly. If someone could weigh in and
see if I have this setup "right", I would appreciate it. Directory
... other pear packages
... all smarty files
... pear basic package files
I want to make sure this looks right, because my PEAR db class appears
to be buried pretty deep (db/db/DB.php) and I want to make sure I
manually put the smarty files in the correct place.
I did a lot of searching, and really didn't come up with much. Would
appreciate some input, thank you very much!
Re: question concerning proper dir structure for PEAR/Smarty
DJ Majestik wrote:
I just leave the PEAR stuff to the PEAR commandline installer:
$ sudo pear install DB
which gives me this:
So, DB.php is on the same level as the DB subdirectory. In fact, all the
classes which have to be included are in this directory
(/usr/local/php/lib/php in my Mac OS X system).
and I have
include_path = ".:/usr/local/php/lib/php"
in my php.ini. The effect being that if do a "pear install
<module_name>", I can always use this:
and it will work.
I would advise you to leave the PEAR directory structure to the PEAR
installer, and put Smarty wherever it makes sense to you. I put it
manually in the /usr/local/php/lib/php directory, in a subdir called
Smarty, and I added /usr/local/php/lib/php/Smarty to my include_path, so
that I can simply do a require('Smarty.class.php').
Real e-mail address unavailable. 5000+ spams per month.