Concepts of PHTML and instructions on viewing phtml format files

Source: Internet
Author: User

Concept:
PHTML (sometimes called PHP) web pages are the same as ASP Web pages that contain PHP (a language similar to JavaScript or Microsoft VBScript) scripts, the PHP script is embedded in the HTML code of the webpage. Before the page is sent to the requesting user, the webpage server calls the PHP interpreter to explain and execute the PHP script. Webpages containing PHP scripts usually use ". php", ". php3", or ". phtml" as suffixes. Like ASP, PHP can be considered as a "dynamic web page ".

View phtml files:
Use Dreamweaver to support phtml (more file types are supported)
The default extension of the ZendFramework template is. phtml. After the template is opened with DW, It is edited in plain text by default. The template cannot be highlighted or display code prompts. You only need to modify the DW configuration file to enable DW to enable phtml and then use the PHP engine for parsing:
Find the following file:
% Dreamweaver installation directory %
Configuration
Documenttypes
Mmdocumenttypes. xml
Set the original content:
<Documenttype id = "PHP_MySQL" servermodel = "PHP MySQL" internaltype = "Dynamic" winfileextension = "php, php3, php4, php5 signature macfileextension =" php, php3, php4, php5 secure file = "Default. php "writebyteordermark =" false ">
Modify to (Add. phtml to the bold part ):
<Documenttype id = "PHP_MySQL" servermodel = "PHP MySQL" internaltype = "Dynamic" winfileextension = "php, php3, php4, php5, phtml" macfileextension = "php, php3, php4, php5, phtml "file =" Default. php "writebyteordermark =" false ">
Save and restart DW.
In a similar situation, you can also find the corresponding parsing engine in the mmdocumenttypes. xml file for manual modification.

  • Source: baike.baidu.com
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.