Html to php Template

Source: Internet
Author: User
I found a problem when I modified an old project, that is, the background pages of my previous project are composed of three template files converted into php: Public head. php, private content. php and public foot. php. Now I need to add several pages. The method I used is to put the previous head. php... I found a problem when I modified an old project, that is, the background pages of my previous project are composed of three template files converted into php: Public head. php, private content. php and public foot. php. Now I need to add several pages. The method I used is to put the previous head. php and foot. php copies the file to a new html file, adds the new content in the middle, tests it, And then extracts the content separately to form a new content. php. But I always feel that I have started using this method, and there must be a good method. My IDE is phpstorm!

Reply content:

I found a problem when I modified an old project, that is, the background pages of my previous project are composed of three template files converted into php: Public head. php, private content. php and public foot. php. Now I need to add several pages. The method I used is to put the previous head. php and foot. php copies the file to a new html file, adds the new content in the middle, tests it, And then extracts the content separately to form a new content. php. But I always feel that I have started using this method, and there must be a good method. My IDE is phpstorm!

Now I have seen a new page folder in the project. Then I wrote a PHP file and included head.html and foot.html. Then I want to test which new template file should include the html file of the new template file in the middle of the PHP file and run the PHP file. Test the variable corresponding to the content.html path of the PHP file, and then run the PHP file. This is the most convenient method I can think.

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.