Wamp working, but what next? Help!
View Single Post
02-06-2009, 05:40 PM
Join Date: Apr 2005
Location: Kent, UK
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,
and another called
, 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
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.
View Public Profile
Send a private message to Dr John
Visit Dr John's homepage!
Find More Posts by Dr John