Solved

Getting phpED to work

Posted on 2011-09-10
7
264 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
[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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

749 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