html5 - php html mixed code, why does it still work with comment symbols?

WBOY
Release: 2016-08-04 09:20:21
Original
1183 people have browsed it

$pfName='market_global'; ?>  GG  IOS  
Copy after login
Copy after login

Even if there are comment symbols at work, it still works. Why, even if the comment symbols are removed, it still works????
why??

Reply content:

$pfName='market_global'; ?>  GG  IOS  
Copy after login
Copy after login

Even if there are comment symbols at work, it still works. Why, even if the comment symbols are removed, it still works????
why??

That kind of comment can only work onhtml! If you want to commentphp, add a slash inside. For exampleTry it out


This comment is html code, not php
php code will still be executed

The comment you wrote is an html comment, not a php comment.
The php comments are
/.../
//

I also had this kind of mistake when I first learned PHP.
is the comment symbol of HTML, which is meant for the browser.
And the PHP interpreter will only recognize// /* */ #These are PHP comment symbols.

Related labels:
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!