DJ Majestik wrote:
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
structure:
pear/
db/
db/
DB/
doc/
tests/
DB.php
... other pear packages
smarty/
... all smarty files
OS/
PEAR/
... pear basic package files
scripts/
package.xml
package2.xml
package.dtd
PEAR.php
System.php
template.spec
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!
I just leave the PEAR stuff to the PEAR commandline installer:
$ sudo pear install DB
which gives me this:
.....
DB/
DB.php
OS/
PEAR/
PEAR.php
.....
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:
require('<module_name>.php');
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').
JP
--
Sorry, <de*****@cauce.org> is a spam trap.
Real e-mail address unavailable. 5000+ spams per month.