Home  >  Article  >  Backend Development  >  What to do if php placeholder cannot be used

What to do if php placeholder cannot be used

藏色散人
藏色散人Original
2021-05-08 09:18:591951browse

php placeholder cannot be used because of a code error. The solution is: first open the corresponding code file; then change "placeholder "Your name here"" to "placeholder="Your name here"" that is Can.

What to do if php placeholder cannot be used

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

Error code:

<form role="search" method="get" id="searchform" class="searchform" action="<?php echo esc_url(home_url(&#39;/&#39;)); ?>">
  <input type="search" class="search rm-input" value="<?php echo get_search_query(); ?>" name="s" id="s" placeholder "Your name here"/>
  <input type="submit" style="display:none" id="searchsubmit" value="<?php echo esc_attr_x(&#39;Search&#39;, &#39;submit button&#39;); ?>" /></form>

I don't know why the placeholder text is not showing in the field...

Workaround:

The missing "=" in the code should be:

placeholder="Your name here"

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if php placeholder cannot be used. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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