Home > Backend Development > PHP Problem > How to convert html to php

How to convert html to php

(*-*)浩
Release: 2023-02-23 14:50:02
Original
6449 people have browsed it

How to convert html to php

is to convert the content in the source code of a website's home page into PHP format (recommended learning: PHP video tutorial)

<div class="mid"><br/><ul><br/><li class="item one"><br/><h3 class="title "><a href="http://cy.whsw.cn/?cat=42">头脑风暴</a></h3><br/><p class="sub-title">头脑风暴法力图通过一定的讨论程序</p><br/></li><br/><div class="clear"></div><br/></ul><br/></div><br/>
Copy after login

Change the content here to PHP format

Because html does not have php code, so just change the source code file name suffix from html to php. If you want to write php code in it. Just add the following. Anywhere on the web page:

已经将你需要的代码转化为php文件,你复制此代码到你新建立文件:比如test.php。就是你想要的效果了。<br/> <br/><?php<br/>$test=<<<ttt<br/><div class="mid"><br/>                        <ul><br/>                            <li class="item one"><br/>                                <h3 class="title "><a href="http://cy.whsw.cn/?cat=42">头脑风暴</a></h3><br/>                                <p class="sub-title">头脑风暴法力图通过一定的讨论程序</p><br/>                            </li><br/>                            <div class="clear"></div><br/>                        </ul><br/>                        </div><br/>ttt;<br/>echo $test;<br/>?><br/>
Copy after login

The above is the detailed content of How to convert html to php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template