[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 286
  • Last Modified:

Getting phpED to work

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
hrolsons
Asked:
hrolsons
  • 4
  • 3
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
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
 
hrolsonsAuthor Commented:
So there's no way I could call the file from a Visual Basic WebBrowser Control?
0
 
Dave BaldwinFixer of ProblemsCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Dave BaldwinFixer of ProblemsCommented:
Why did you post that link?
0
 
hrolsonsAuthor Commented:
Just to reiterate, like you said, it can be run from the command line successfully.

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

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now