Prev | Current Page 91 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

Then load http://localhost/tshirtshop/test.php (or http://localhost:8080/
tshirtshop/test.php if Apache works on port 8080) in a web browser.
How It Works: Preparing the tshirtshop Alias on Windows and Linux
This first step toward building the TShirtShop e-commerce site is a small but a very important one, because it
allows you to test that Apache, PHP, and the tshirtshop alias work OK. If you have problems running the test
page, make sure you followed the previous XAMPP installation steps correctly.
No matter whether you??™re working on Windows or a Linux flavor, loading test.php in a web browser should give
you the PHP information returned by the phpinfo() function as shown in Figure 3-4.
CHAPTER 3 ?–  STARTING THE TSHIRTSHOP PROJECT 36
Figure 3-4. Testing PHP and the tshirtshop alias
You also ensured that the tshirtshop directory and all its contents can be accessed properly by the web server.
Installing Smarty
Installing Smarty requires simply copying the Smarty PHP classes to your project??™s folder.
Many web-hosting companies provide these classes for you, but it??™s better to have your own
installation for two reasons:
??? It??™s always preferable to make your project independent of the server??™s settings, when
possible.
??? Even if the hosting system has Smarty installed, that company??™s version might be changed
in time, perhaps without notice, possibly affecting your web site??™s functionality.


Pages:
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103