How to Read the File Contents of PHP

How to Read the File Contents of PHP thumbnail
Read the contents of a PHP file.

A PHP file (which stands for PHP Hypertext Preprocessor) is a document written in a special scripting language that is used to display dynamic Web content. It produces images and text on screen similar to HTML and ASP documents. The programmer can add text, HTM and javascript to the PHP file. There is more than one way to read a PHP file (extension php, php3 or phtml).

Things You'll Need

  • Text editor
  • Browser
  • PHP viewer
Show More

Instructions

    • 1

      Open the PHP file in a simple text editor like Notepad. The script will display in Notepad the same way you'd see the elements of an HTML file.

    • 2

      Upload the PHP file to a Web server that supports scripting languages (ask your Web hosting provider) as an alternative. Open the file in a browser then select "View" on the main menu. Choose "Page Source" to view the contents of the PHP file.

    • 3

      Use a PHP viewer to read the PHP file as another alternative (see "Resources" for an example). The viewer program may be free or available for a fee. Click "Open" or a similar option and navigate to the PHP document in your file folder. The viewer will display both your PHP file contents (the script) and how the file will look when displayed online.

Related Searches:

References

Resources

  • Photo Credit internet image by Soja Andrzej from Fotolia.com

Comments

You May Also Like

Related Ads

Featured