PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE (Dedicated web hosting) EASY What

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY What this chapter covers: Determining what you need Deciding whether to create a local testing setup Using a ready-made package Doing it yourself setting up Apache and PHP on Windows and Mac OS X Getting PHP to work with IIS on Windows Making sure PHP has the right settings Now that you ve decided to use PHP to enrich your web pages, you need to make sure that you have everything you need to get on with the rest of this book. Although you can test everything on your remote server, it s usually more convenient to test PHP pages on your local computer. Everything you need to install is free. In this chapter, I ll explain the various options and give instructions for both Windows and Mac OS X. What you need to write and test PHP pages PHP is written in plain text, so you don t need any special authoring software. However, your life will be a lot easier if you choose a good script editor. I ll offer some advice on what to look for. The other thing you need is a web server capable of understanding PHP. Checking whether your website supports PHP The easiest way to find out whether your website supports PHP is to ask your hosting company. The other way to find out is to upload a PHP page to your website and see if it works. Even if you know that your site supports PHP, do the following test to confirm which version is running. Checking the PHP version on your server 1. Open Notepad or TextEdit and type the following code into a blank page: 2. Save the file as phptest.php. It s important to make sure that your operating system doesn t add a .txt filename extension after the .php. Mac users should also make sure that TextEdit doesn t save the file in Rich Text Format (RTF). If you re at all unsure, use phptest.php from the download files for this chapter. 3. Upload phptest.php to your website in the same way you would an HTML page, and then type the URL into a browser. If you see a three-part number like 5.2.0 displayed onscreen, you re in business: PHP is enabled. The number tells you which
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

Leave a Reply