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.
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('/')); ?>"> <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('Search', 'submit button'); ?>" /></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!