Create your own development environment - just add water
In the real world you will need a place to try out new web pages before you make them 'live' on the customer facing web site.
Today we're going to build a development environment that allows us to try out dynamic PHP pages on our local machines, with a database thrown in for good measure.
The ingredients we'll need are:
- a web server (we'll use Apache)
- the PHP interpreter
- the database engine (MySQL)
- some database management software (phpMyAdmin)
To save on download times, I've put copies up on the local server - have a look in the dWebPro directory (or go here if you're inside the firewall) and you'll find the following files:
dwebpro_6.5.0.exe 7.9M - the web serverDownload and install each of these in turn on a PC running Microsoft windows and you'll have your very own development environment.
mysql40_package.exe 5.4M - the database software
php4_package.exe 7.5M - the PHP interpreter
phpmyadmin_package.exe 2.9M - database admin software
Testing
If you installed with all the default options you can run the web server by clicking on the dWebPro icon on your desktop. After the spash screen you should see the phpMyAdmin screen displayed in the web browser. Note the URL. It doesn't point to a local file but calls http://127.0.0.1:8080/phpMyAdmin/ - you're looking at a page that's being served by a real live web server running on your PC with a local ip address (127.0.0.1, using port 8080).
Using it in anger
Now to try it out for yourself. Copy the form and php pages we created last week into the web server home directory. This should be: C:\DWebPro\deploy\www if you used the default installation.
Now open up the form page by entering it's server address in your browser's address bar. Something like: http://127.0.0.1:8080/testform.html
Submit the form, read the results and take a break.
thanks to David Reeves for "High Purity"
No comments:
Post a Comment