473,499 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question concerning proper dir structure for PEAR/Smarty

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!

Jim

Jul 17 '05 #1
1 2034
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.
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1568
by: Sebastian Benner | last post by:
Hi, what are your experiences with Smarty and PEAR/HTML_Progress? http://pear.laurent-laville.org/HTML_Progress/apidoc/HTML_Smarty/default/ I tried it, but having difficulties producing a...
6
1706
by: DJ Majestik | last post by:
OK, I am devising a php page that will handle a form submission, and wanted to know if anyone has already setup such an idea, or if you had links to point to good tutorials on this. Basically I...
0
1589
by: Conrad | last post by:
Hi, I'm very new to Smarty Template Engine and I'm using PHP 5.0.4 on the Windows XP Professional platform and I have the following question: When I change the 7th line of the script to use a...
2
1299
by: awebguynow | last post by:
latest PEAR on W32, refers to PHP5 inaccurately. I've seen posts regarding path's that get messed up, by lost ini's or registry settings. I don't think that's my case, because I can't find PHP5 in...
1
2208
by: IchBin | last post by:
I am new to PHP and I am running on Windoze XP SP 2. Just noticed that the PEAR installed dir structure I have (to DB subdir) is : C:\php5.2\PEAR\pear\DB My registry vars are:...
4
2108
by: awebguynow | last post by:
Re: only got "pear.old_bat" I had a previous post ".. Upgrade Methods ..." and so far I've gotten around most thorny issues, including patching php5.1.4 with php5apache2_2.dll so I can run it...
6
2548
by: alvarojaviervera | last post by:
Im programer (about 2 years ago I started), and allways I use PEAR. and Now I was thinking about change my tool for building custom dynamic sites. What do you think sholud be better Smarty, may be...
2
2053
by: Gene | last post by:
i'm newcomer in using smarty and i have problem like this: i want to have one template file (e.g. index.tpl) in this file section which use variable {$content}. and two files *.php which are using...
2
1322
by: howa | last post by:
This is quite interesting, PHP is so success, but Pear as an offical package, seems to be a little bit weak. i have developed PHP for many years, and can easily do my job without Pear, e.g. I...
0
7130
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5468
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.