Creating a PHP Page

Although just about any HTM or HTML file can be renamed to have a .php extension, you may run into trouble with Byte Order Marks (BOMs). A BOM is a Unicode character used to denote the beginning of a string of Unicode characters and to serve as a marker that indicates the text is encoded in UTF-8, UTF-16, or UTF-32. In most cases, it will never be visible in a browser but it can cause problems in PHP files.

To avoid a BOM, it’s best to create a new PHP file directly from the New Document menu in Expression Web 2. However, converting an existing HTM/HTML file to PHP is a solution you may need when working within an existing file that you want to run PHP scripting on. You’ll learn how to do this in the next topic.

In this exercise, ...

Get Microsoft® Expression® Web 2 Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.