Page 1 of 1

Saving and running PHP files

PostPosted: 14. April 2010 18:34
by BillClark
Help! Help!
After I write a program like Hello World and save it in C:\xampp\htdocs\xampp\... When I try to load and run the progam I get a applet asking me to open or save this file, it doesn't matter which option I take the system just loops back to the applet and I get nothing.

I am running Vista on my laptop and the localhost is running ok according to status check, plus I can access Sql without any problems.

When I hand type file location I get a message stating file is not on this server contact Web administrator.

I had this system working before and could do everything I just saved files in C:\xampp\htdocs\xampp and they ran perfectly, I had to uninstall and reinstall xampp and that is when this problem began! Am I saving my files in the wrong place or am I making a mistake when I load them. When I open an internet window and type localhost it always loads as \localhost\xampp is this right or should it be just localhost.

Any suggestions to get me out of this problem would be greatly appreciated! I am getting very frustrated!

Thanks in Advance

Bill Clark

Re: Saving and running PHP files

PostPosted: 15. April 2010 03:43
by Altrea
BillClark wrote:When I try to load and run the progam I get a applet asking me to open or save this file

How do you try to access the file? Which URL is in your browser address bar?

BillClark wrote:Am I saving my files in the wrong place or am I making a mistake when I load them.

Could be both. Don't save your files in the htdocs/xampp folder, because there are only files relating to xampp test application. make your own folder inside the htdocs folder (e.g.: C:\xampp\htdocs\projectxyz) and save your files there.
Then it can be accessable with the URL http://localhost/projectxyz/FILENAME

BillClark wrote:When I open an internet window and type localhost it always loads as \localhost\xampp is this right or should it be just localhost.

Thats the correct behaviour for the standard installaton. The index.php file in your htdocs folder automatically does a redirect to the xampp folder. You can delete or edit this index.php file if you don't want the redirect.

Re: Saving and running PHP files

PostPosted: 15. April 2010 20:50
by BillClark
Thank you Altrea, I'll take your advice and make my own folders, I'll keep you posted!

BillClark