Solved

Getting phpED to work

Posted on 2011-09-10
7
266 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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

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…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

695 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