? > <? Behind <? is the abbreviation of <?php. HTML code snippets can be inserted between ?><?php, just like Servlet in Java. This is a procedural way of writing, a mix of php and html. For formal projects, it is recommended to use a template engine or framework and a three-layer separation design pattern.
replyBut I suddenly found a new problem, which is this code. When running, it prompts Parse error: syntax error, unexpected end of file in D:\phpStudy\WWW\news\admin\list.php on line 338. Of course, the 338 lines of code are just </html>, and there must be nothing wrong. I deleted them one by one and checked, and found that there were errors in the code on the previous page and the next page. Does the teacher know what is going on?
replyBut I suddenly found a new problem, which is this code. When running, it prompts Parse error: syntax error, unexpected end of file in D:\phpStudy\WWW\news\admin\list.php on line 338. Of course, the 338 lines of code are just </html>, and there must be nothing wrong. I deleted them one by one and checked, and found that there were errors in the code on the previous page and the next page. Does the teacher know what is going on?
Mixed php and html, meaning <php space php>!!!
Write the PHP syntax in the template
? > <? Behind <? is the abbreviation of <?php. HTML code snippets can be inserted between ?><?php, just like Servlet in Java. This is a procedural way of writing, a mix of php and html. For formal projects, it is recommended to use a template engine or framework and a three-layer separation design pattern.
Because I just happened to meet you, I can make up 20 words. Uh-huh-huh-huh-huh-huh-huh-huh-huh-huh