AllExperts > PHP3 
Search      
PHP3
Volunteer
Answers to thousands of questions
 Home · More PHP3 Questions · Answer Library  · Encyclopedia ·
More PHP3 Answers
Question Library

Ask a question about PHP3
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Lukas Neuburger
Expertise
Experienced PHP developer, willing to answer questions pertaining to all aspects of PHP, including: installation, configuration, database integration, and general application development questions.

Experience
Experience
Accomplished developer adept at getting the absolute most out of open source tools such as PHP, Apache, Linux, and MySQL.

Education
Bachelors of Science in Computer Science
 
   

You are here:  Experts > Computing/Technology > Perl/PHP > PHP3 > PHP Preview

PHP3 - PHP Preview


Expert: Lukas Neuburger - 5/11/2004

Question
My current HTML editor (coffee Cup) would not allow me to preview any files ending in .php although I am positive it allowed me in the past.  So, I bought some new software that could specififcally parse and preview PHP documents (Editplus)

After installing the software I opened one of my php pages and clicked on preview and the same problem happened.  At first a dialog box appeared that looked as if a download was starting and then it just displayed "Action Cancelled"  

This is also happening when I open up IE and attempting to open the PHP file off of my hard drive but IE allows me to view php files on the web just fine.  I tried re-installing IE but it did not help

Any ideas?  I would really like to preview these documents on my PC rather than having to upload them first to the web and view them there.  

Answer
Hi Ron,

I took a look at the EditPlus web site [1] and I actually did not see any mention of the ability to parse and preview PHP documents. The only blurb I found relating to the preview feature was:

“Seamless web browser for previewing the content of your HTML document or Java applet without leaving the editor. Browser window also has common browser commands so you can browse Internet web sites as well as local HTML files.”

This mentions only the ability to preview HTML documents, and makes no mention of being able to understand PHP documents. EditPlus does mention having syntax highlighting for PHP code, but all that means is that when you edit a PHP file different colors will be used to display your PHP source code in the editor and has nothing to do with parsing and displaying the output of a PHP script. Regarding Internet Explorer, I  know for a fact that it does not know what to do with a local PHP file, so there was really no gain to reinstalling Internet Explorer.

You could try more advanced tools such as PHPEdit [2] or PHP Expert Editor [3]. Both of these tools allow you to run and debug PHP scripts locally on your computer as long as you have PHP installed on your system. You can find reviews of many popular PHP editors at the PHP-Editors site [4].

Another option If you want to preview and test your PHP code locally on your computer before you upload it to a remote web server, is to set up a development environment on your local computer. This basically means installing a web server (most likely Apache), PHP, and if needed a database (like MySQL) on your computer.  Not only does this allow you to completely test your work on your local computer but it will definitely boost your knowledge of installing and configuring PHP.

I am including links to obtain the components you'll need:

- Apache web server (http://httpd.apache.org/)
- PHP (http://www.php.net/downloads.php)
- MySQL (http://dev.mysql.com/downloads/mysql/4.0.html)

Also for instructions on installing PHP check out:
- http://www.php.net/manual/en/installation.php

Regards,

Lukas

[1]http://www.editplus.com/feature.html
[2]http://www.phpedit.net/products/PHPEdit/
[3]http://www.ankord.com/phpxedit.html
[4]http://www.php-editors.com/

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.