How to solve the problem that real device pictures are not displayed in the WeChat applet

angryTom
Release: 2020-03-23 10:48:37
Original
10825 people have browsed it

How to solve the problem that real device pictures are not displayed in the WeChat applet

How to solve the problem that the WeChat applet real machine pictures are not displayed

: During the real machine test, it was found that some local pictures can be displayed on the development tool , but it cannot be displayed when previewing on the real machine

The code is written like this

  
Copy after login

Cause and solution: The path written like this is not recognized on the real machine and needs to be written relative to the root directory

Copy after login

Recommended learning:Small program development

Other solutions:

If it is not a path problem , there are several other ways to find the problem:

1. The picture is loaded using image;

2. There is no Chinese in the URL of the picture;

3. HTTP should be lowercase http and the suffix of the picture should be lowercase .png or .jpg

4. The domain name has been registered;

5. The picture name has no spaces

PHP Chinese Internet, a large number ofMySQL video tutorials, welcome to learn!

The above is the detailed content of How to solve the problem that real device pictures are not displayed in the WeChat applet. For more information, please follow other related articles on the PHP Chinese website!

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!