How to View PHP File Types

How to View PHP File Types thumbnail
PHP files are simple text files.

Files with the .php file extension contain code to display content on web pages. Often, .php files are a mix of HTML and PHP code. PHP is used to perform tasks like storing data from web forms, displaying information from a database or running calculations on dynamic websites. Because PHP code is run server-side, you will not see any PHP code on a website if you view the page source. Instead, you need direct access to the server files before they are sent out to an Internet browser.

Instructions

    • 1

      Open a text editor. Notepad on Windows and Textedit on Mac OS X are capable of reading PHP files. Within the text editor, open the PHP file you want to view like any other file. On Windows, you will need to set the file type to "All files" in the file browser dialog.

    • 2

      Make the desired changes to the PHP file. If the PHP is accompanied by HTML, you can find the PHP code between specific PHP tags. PHP tags are open with "<?php" and close with "?>." Some servers support a shorter version of the opening tag as "<?."

    • 3

      Upload the changed file to your web server and the changes will take immediate effect. Every time a page containing PHP is loaded the code is executed.

Tips & Warnings

  • Text editors like Notepad++ and Text Wrangler offer syntax highlighting to make reading code easier (see Resources).

Related Searches:

References

Resources

  • Photo Credit computer ed email image by haruspex from Fotolia.com

Comments

You May Also Like

  • How to Edit PHP Files

    PHP is a server side scripting language used in creating dynamic web pages. It is possible to use third-party PHP applications on...

  • How Do I Tell Windows What Program to Use to View a PHP File?

    When you choose to open a .php file through Windows Explorer or the "Run" window, Windows 7 opens the file in the...

  • How to Run a PHP File in a Browser

    Unlike static HTML pages, you cannot view the Web page created by a PHP script simply by opening the file in a...

  • How to Read a File in PHP

    Reading the contents of a file is an important part of dynamic Web scripting as well as command-line scripting. PHP allows you...

  • How Do I Test a PHP File?

    PHP is an open source scripting language that's most often used for Web-based applications, but can also be used from the command...

  • How to Make a PHP File

    The PHP Group aids in managing PHP guidelines because there are no formal specifications that outline PHP. PHP was created in 1995...

  • How to Preview a PHP File

    Unlike HTML files, PHP files require you to have a PHP server running on your computer to view PHP files locally. As...

  • How to Convert PHP Files to Microsoft Publisher

    Over the years, file extensions will change meaning as old programs are made obsolete. Currently (2010), a PHP file refers to a...

  • How to Include a PHP File in an HTML Page

    PHP is a powerful programming language used to run millions of dynamic websites. Often, it is interspersed with HTML so you can...

  • How to Determine a File Type in PHP

    PHP is a web server programming language used to create dynamic web pages. This language can read user input, SQL databases and...

  • What Is the File Extension PHP?

    The .PHP file extension is used in the PHP (Hypertext Preprocessor) programming language for developing PHP-based Web applications and websites. Many modern...

  • How Do I Play a PHP File?

    The PHP file extension is typically used by web designers in the creation of interactive web sites. PHP scripts can process online...

  • How to Convert an XML File to a PHP File

    XML (eXtensible Markup Language) is a convenient way of writing human-readable data sets which can also be shared between computer systems that...

  • How to Save a File As a PHP

    PHP (PHP: hypertext preprocessor) is a scripting language that runs on a server. PHP files can be created using HTML, PHP or...

  • How to View PPS Files

    Dealing with a file type that you are unfamiliar with can be a frustrating task. Fortunately, most files will automatically open in...

  • How to view PHP website on localhost

    There are few ways to check your PHP website. 1. Either on Localhost 2. Directly on webhosting. Getting webhosting and trying it...

  • How to Play an Audio File in PHP

    Playing an audio file in PHP requires minimal programming, which you can accomplish by using only pure PHP functions. A text editor,...

  • How to Read a Text File in PHP

    Reading the contents of a text file is an important part programming, whether you are putting data on a web page, or...

Related Ads

Featured