Quick question re: how to publish PHP script to localhost using WAMP editor

Really new to PHP.  I have a command line script that works that I want to now publish to localhost and run via a browser.  When I double click the script (in a Windows window) it opens the editor, which is fine.  But Publish seems to publish the WebMatrix 3 splash, not my script.
LVL 1
Mike CaldwellConsultant to IP industryAsked:
Who is Participating?
 
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
First, copy the PHP file to c:\wamp\www along with any files that it includes.  Open your web browser.  Type http://localhost/ followed by the name of your PHP file.  You should see the text that it produces on the screen.  That assumes that there are 'echo' statements that put text on the screen.  It may not run in the browser.  Web Servers usually have very limited permissions and can't do everything that you are allowed to do from the command line.
0
 
Dave BaldwinFixer of ProblemsCommented:
What web server do you have installed?  And is PHP setup to run in that web server?  IIS? Apache?  WAMP?  XAMPP?
0
 
Praveen Kumar BonalaConnect With a Mentor Programmer AnalystCommented:
1.install wamp from here:http://www.wampserver.com/en/download.ph...
 2.install it
 3.a tray icon will appear
 4.right click it start the server
 5.open a notepad ,type your code ,save as "myfirsttry.php" (with qoutes)
 6.copy this file and paste it in wamp/www folder
 7.again go to the tray icon launch the browser from there
0
 
Mike CaldwellConsultant to IP industryAuthor Commented:
I installed WAMP, so I assume my server is Apache.  Praveen, I followed your steps (WAMP was previously installed), but don't understand step 7.  In the tray I have the WebMatrix3 icon, which only reopens the editor.  I do have an icon for WAMP on my desktop, but double clicking that does nothing.
0
 
Mike CaldwellConsultant to IP industryAuthor Commented:
Thanks to all.  My son finally came over and had mercy on me.  He made one of our URLs available to me, so I'm running it out of that for my learning experiments.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.