Solved

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

Posted on 2015-02-07
5
213 Views
Last Modified: 2015-02-07
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.
0
Comment
Question by:Mike Caldwell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40596269
What web server do you have installed?  And is PHP setup to run in that web server?  IIS? Apache?  WAMP?  XAMPP?
0
 
LVL 4

Assisted Solution

by:Praveen Kumar Bonala
Praveen Kumar Bonala earned 250 total points
ID: 40596270
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
 
LVL 1

Author Comment

by:Mike Caldwell
ID: 40596299
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
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 250 total points
ID: 40596336
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
 
LVL 1

Author Comment

by:Mike Caldwell
ID: 40596390
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

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question