Saving and running PHP files

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Saving and running PHP files

Postby BillClark » 14. April 2010 18:34

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
BillClark
 
Posts: 9
Joined: 06. March 2010 21:48

Re: Saving and running PHP files

Postby Altrea » 15. April 2010 03:43

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.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Saving and running PHP files

Postby BillClark » 15. April 2010 20:50

Thank you Altrea, I'll take your advice and make my own folders, I'll keep you posted!

BillClark
BillClark
 
Posts: 9
Joined: 06. March 2010 21:48


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 79 guests