testing php file
Posted by: dstar (120.155.185.---)
Date: May 03, 2016 04:50PM

I have just downloaded the latest edition of wampserver. I made sure that all services were running and went to local host which gave me the presentation of all the option in wampserver which gave me the indication that everything was fine,now i have to admit i am i bit of a novice with wampserver which is why i am trying to use the program to gain knowledge. however i am unable to run a test php file. i went into www. directories opened up a new text file put the code<? echo hello world ?> i saved the text to all files and named the document test.php. So i went to my browser and typed in [localhost] and the correct reference to my documen which is test.php instead of displaying hello world this then took me to a page that was [localhost] on this page was a whole lot of sites on how to run a test php file so i decide to look at a few and they were suggesting to do the exact methods i was using if you have any suggestion please feel free to give me some advice cheers.

Options: ReplyQuote
Re: testing php file
Posted by: RiggsFolly (Moderator)
Date: May 03, 2016 05:48PM

Hi,


Its not a good idea to put anything in the \wamp\www folder

Instead create a subfolder \wamp\www\project1

Then put your new files in there

To run them simply enter `localhost/project1/test.php`


Also if you are using notepad.exe as your editor that will add a .txt to the filename automatically i.e. test.php..txt so I suggest you download notepad++ as that is free and a great little editor for PHP code. Then in furure use that instead of notepad.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: testing php file
Posted by: dstar (120.155.185.---)
Date: May 03, 2016 11:17PM

Thanks for that feed back on that question,it worked cheers.

Options: ReplyQuote


Sorry, only registered users may post in this forum.