View Single Post
Old 02-06-2009, 05:40 PM   #2 (permalink)
Dr John
The Contributor
 
Join Date: Apr 2005
Location: Kent, UK
Posts: 54
Thanks: 0
Dr John is on a distinguished road
Default

You first create a folder in the htdocs folder which is inside your wamp folder, one folder for each project you are working on of course, and start the server service as required.

You don't use a debugger with wamp, as it just runs the server services that you need. Your debugger uses the IDE, as far as I known anyway.

Then to see what you have done, you point your web browser at the folder and file using localhost/foldername/filename

When it is all working, you upload the php files to your online server, and use a mysql dump to get a copy of your database to upload. Easy Peasy.

However, the name of your database, the username and password, for the online host will not be the same as those for your local server. What I do is put all that database connection info in a single file, and use an include to load it into each php file that needs it.

In more detail, I create one file called, say, fred-local.php and another called fred-remote.php, each with the appropriate database connection stuff in them. I then make a copy of fred-local.php and rename it to just fred.php, and it is fred.php that I include into the php files that need it. Then when it is time to upload to the remote server, I delete fred.php, make a copy of fred-remote.php and rename it as fred.php That way I don't have to alter ANY other php file, as they don't know that fred has undergone a transplant operation. And if I need to do more editing of the files, I copy and rename fred-local.php to fred.php and continue working. Very simple, very easy.

PS Use Eclipse - it rocks.
__________________
www.kidneydialysis.org.uk
Dr John is offline  
Reply With Quote