PDA

View Full Version : pear ngan smartylibs


mnajem
08-04-03, 04:39 PM
mnajem cuba nak pahamkan pasal template ni tapi tak paham-paham jugak.


ekcelli macam mana smartylibs ni berfungsi,dia ni.
kena pakai *nix jugak ke?

atas windows takleh jalan ke? /usr/local/lib/php/Smarty/Smarty.class.php
/usr/local/lib/php/Smarty/Smarty_Compiler.class.php
/usr/local/lib/php/Smarty/Config_File.class.php
/usr/local/lib/php/Smarty/debug.tpl
/usr/local/lib/php/Smarty/plugins/*.php

/web/www.mydomain.com/smarty/guestbook/templates/
/web/www.mydomain.com/smarty/guestbook/templates_c/
/web/www.mydomain.com/smarty/guestbook/configs/
/web/www.mydomain.com/smarty/guestbook/cache/

/web/www.mydomain.com/docs/guestbook/index.php


pastu bila manpages apsal mnajem rasa tak penah belajar php je.padahal namanya kan nak memudahkan pakai smartylibs.

ni yang rasa tak smart ni :gelaks:

apairudin
09-04-03, 01:08 AM
Boleh je atas windows pun, yang penting:

1. Fail2 class tu, letak dlm include path (tengok setting kat php.ini), atau letak je dlm document root/application root (eg: /var/www/html/)

2. Simpan semua templates dalam folder templates, dan copy direktori lelain yang ada dlm pakej smarty tu ke doc root/app root.
3. Pastikan templates_c writable oleh sesapa yang run apache

an0nymous
09-04-03, 09:32 AM
aku punya run windows + linux....

clue : file path kenalaa ubah ikut environment eg

/usr/loca/smarty.inc tak sama dengan c:\php\include\smarty