添加PHP标记时,Bootstrap会混乱

添加PHP标记时,Bootstrap会混乱

问题描述:

I'm working on a personal project of bootstrap and wanted to experiment with some PHP. I first build out my static website and now I'm adding the PHP. The first thing I wanted to get done is the registration form. Now whithout the PHP tag ( ) everything looks just fine. But as soon as I add the tags into the source code ( even without any code ) the webpage just shows the entire sourcecode in the browser.

我正在开发一个个人的bootstrap项目,并想尝试一些PHP。 我首先构建我的静态网站,现在我正在添加PHP。 我想要完成的第一件事就是注册表格。 现在没有PHP标签()一切看起来都很好。 但是只要我将标签添加到源代码中(即使没有任何代码),网页就会在浏览器中显示整个源代码。 p> div>

Sounds like you are not accessing the file through xampp but directly instead. you need to open the page via the URL. (i.e. http://localhost/index.php)