Prev | Current Page 546 | Next

W. Jason Gilmore

"Beginning PHP and MySQL: From Novice to Professional"

class.php, which is found in
the Smarty directory libs/. Assuming the previous locations, on Unix you
should set this directive like so:
include_path = ".;/usr/local/lib/php/includes/smarty/libs"
476 CHAPTER 19 ?–  T EMPLAT I NG WITH SMARTY
On Windows, it would be set as so:
include_path = ".;c:\php\includes\smarty\libs"
You??™ll probably want to append this path to the other paths already assigned to
include_path because you likely are integrating various libraries into applications
in the same manner. Remember that you need to restart the Web server
after making any changes to PHP??™s configuration file. Also note that there are
other ways to accomplish the ultimate goal of making sure that your application
can reference Smarty??™s library. For example, you could simply provide
the complete absolute path to the class library. Another solution involves
setting a predefined constant named SMARTY_DIR that points to the Smarty class
library directory, and then prefacing the class library name with this constant.
Therefore, if your particular configuration renders it impossible for you to
modify the php.ini file, keep in mind that this doesn??™t necessarily prevent you
from using Smarty.
3. Complete the process by creating four directories where Smarty??™s templates and
configuration files will be stored:
??? templates: Hosts all site templates. You??™ll learn more about the structure of these
templates in the next section.


Pages:
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558