Microsoft FrontPage Tips and WorkArounds, Including PHP 

You can still use FrontPage, even with PHP.  Here are some of the tips, tricks and work-arounds.

General FrontPage Resources:

Tutorials


Other Frontpage Tips

Using FrontPage with PHP

Frontpage doesn't like to play well with PHP.  Why?  Well, Frontpage IS a Microsoft product and they don't make any money off of PHP (which is free) and they DO sell a product that is similar in functionality (ASP / VB).  But, Frontpage CAN be made to play with PHP reasonably well, here's how:

Other Tips

Q.  What is the benefit of using ASP style tags when coding PHP in FrontPage?
A.
  FrontPage will not modify anything between <% and %> period.  The same is mostly true with <?php and ?> except when you embed them inside a tag's parameter.  For example, 
<FONT FACE="<% echo "$fontname"; %>" SIZE="2">
will work better than using standard PHP tags. 

Q.  So then how do I get PHP to recognize ASP style tags?
A.
  You need to set asp_tags = On; in the PHP.ini file that is either in your windows folder (usually C:\windows or C:\winnt) or in the folder where php.exe is installed.

Change settings in FrontPage 2003

Before you can use PHP with FrontPage 2003, you must make the following changes to settings in FrontPage:

Disable features that require the FrontPage Server Extensions

If the Web server that runs your PHP pages has the FrontPage Server Extensions from Microsoft installed, do the following:
  1. On the Tools menu, click Page Options, and then click the Authoring tab.
  2. Under FrontPage and SharePoint technologies, clear the SharePoint Services and Browse-time Web Components check boxes.

HideDisable features that create ASP or ASP.NET code

If the Web server that runs your PHP pages can also run ASP, do the following:
  1. On the Tools menu, click Page Options, and then click the Authoring tab.
  2. Under Browsers, clear the Active Server Pages check box.

HideEnable and use ASP-style <% %> code delimiters

Do the following:
  1. Open the php.ini (The master configuration file for PHP that you can customize to help you control the way PHP works on your site) file on the Web server, and set asp_tags="1".
  2. Use ASP-like <% and %> tags instead of the <? php?> tags. This stops FrontPage from reformatting your PHP code.

     

    Note  As an alternative, you can use <script language="php"> and </script> tags instead of <? php?> tags.

     

Configure PHP file extensions to open in Design view

  1. On the Tools menu, click Options, and then click the Configure Editors tab.
  2. In the Extensions list, locate and select the .php file extension. If the .php extension does not appear in the list, you must add it.
  3. In the Editors list, select FrontPage (Open as HTML).
  4. Click Make Default.

More on Frontpage and PHP