Question about the separation of HTML code and PHP look at the http://123langzheng.blog.163.com/blog/static/1362078062011125111528576/
The following example illustrates their usage. assume that the IntegratedTemplate class and the IntegratedTemplateExtension class are in C: \ php4 \ pear \ HTML \ ITX. php and C: \ php4 \ pear \ HTML \ ITX. php. The code we wrote is stored in C: \ TestPHP \ PHP4 \ Welcome.htm and C: \ TestPHP \ HTML \ Welcome. php. Set C: \ TestPHP \ PHP4 to a virtual directory/testphp on the Web Server and grant the script execution permission. make sure that C: \ TestPHP \ HTML \ Welcome.htm cannot be accessed through a remote browser. Set include_path = ".; C: \ php4 \ pear" in php. ini"
I used Zend Studio 10.0 and php 5.4.
Assume that the IntegratedTemplate and IntegratedTemplateExtension classes are in C: \ php4 \ pear \ HTML \ ITX. php and C: \ php4 \ pear \ HTML \ ITX. php respectively.
What does that mean? Why do we need to assume that? Where are the IntegratedTemplate and IntegratedTemplateExtension classes?
What is the pear folder?
I have read the tutorial "PHP from entry to proficient in version 2". what about this?
The above description is already quite adequate, but I am too stupid to understand it?
Reply to discussion (solution)
1. pear is a class library written in php code. it is popular in PHP4.
Because php5 introduces a large number of new features, some classes that originally needed to be written in code are also finalized and built into the php system.
So now the php4-based tutorial is outdated.
2. Separation of html code and php code, collectively referred to as template technology
Compared with Smarty, the professional template engine IntegratedTemplate and IntegratedTemplateExtension are pediatrics.
Smarty is also written in php code and needs to be introduced during use
Smarty 4 has been deployed in Java, and there is a tendency to replace Jstl
3. of course, a huge system is not necessarily suitable for practical applications, so most open-source php projects have their own template engine.
4. it is better to write mixed-coding code at the beginning, which is conducive to the systematic learning of structured programming ideas.
After in-depth analysis, you will find that the template technology is superior, and then you have the ability to write your own template engine.