In the following exercise, you??™ll install Smarty into a subfolder of the tshirtshop folder
named libs. The steps should work the same no matter what operating system you??™re running.
CHAPTER 3 ?– STARTING THE TSHIRTSHOP PROJECT 37
Exercise: Installing Smarty
1. Create a folder named libs inside the tshirtshop folder, and then create a folder named smarty inside
the libs folder.
2. Download the latest stable release of Smarty from http://smarty.php.net/download.php. The archive
is a .tar.gz file. To open it under Windows, you??™ll need a program such as WinRar (http://www.rarlabs.com)
or WinZip (http://www.winzip.com).
3. Open the downloaded Smarty archive, and copy the contentsof the Smarty-2.X.Y/libs directory from
the archive to the folder you created earlier (tshirtshop/libs/smarty). You only need to copy the contents
of the mentioned libs folder, nothing more. (With Smarty 2.6.18, the latest version of Smarty we??™ve
used for our tests, your tshirtshop/libs/smarty folder contains four .php files, and two other folders:
internals and plugins.)
4. To operate correctly, Smarty needs three working folders, which you need to create: templates,
templates_c, and configs. Create a folder named presentation inside the tshirtshop directory,
and in this folder, create the two folders named templates and templates_c. The presentation folder
will contain all the files of the TShirtShop presentation layer.
Pages:
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104