Solved

Getting phpED to work

Posted on 2011-09-10
7
263 Views
Last Modified: 2012-05-12
I have just started using phpED and I'm having trouble.  

When I run in phpED:

<?php
    echo "Hello World";
?>

It displays:

Hello World

As it should.  But when I open the file(file:///C:/testing/hello_world.php) in FireFox, it simply displays as a text file:
<?php
    echo "Hello World";
?>

How to I get it to process the php?  Any ideas?
0
Comment
Question by:hrolsons
  • 4
  • 3
7 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 36517282
That is correct behavior.  The PHP interpreter runs thru a web server, in your case, one included in phpED.  When you open it as a file, there is no server to know it should be interpreted by the PHP interpreter.

You must have a web server to execute PHP code in your browser.  You can run PHP from the command line but that will be a 'DOS' window, not a browser.
0
 

Author Comment

by:hrolsons
ID: 36517346
So there's no way I could call the file from a Visual Basic WebBrowser Control?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36517432
No, I don't think so.  You can set up IIS to run both ASP.NET and PHP and you might be able to do it there.  But you can't call it as just a file and have it work.
0
ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

 

Author Comment

by:hrolsons
ID: 36520691
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36520938
Why did you post that link?
0
 

Author Comment

by:hrolsons
ID: 36523815
Just to reiterate, like you said, it can be run from the command line successfully.

0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36524706
And what do you mean by that?  There is nothing in this question about running anything from the command line.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

825 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