Home > Backend Development > PHP Tutorial > Ask for advice on replacing the first part of the image address with php regular rules

Ask for advice on replacing the first part of the image address with php regular rules

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-10-24 00:12:43
Original
1176 people have browsed it

How to use PHP regular to replace the image address http://img04.taobaocdn.com/ba...!!0-item_pic.jpg_230x230.jpg with https://img.alicdn.com/bao/up...!! 0-item_pic.jpg_230x230.jpg

img04 The 04 number behind it will change

That is, replace http://img0*.taobaocdn.com/ with https://img.alicdn.com/

I tried some methods, but either all of them were replaced or they couldn’t be replaced normally

Reply content:

How to use PHP regular to replace the image address http://img04.taobaocdn.com/ba...!!0-item_pic.jpg_230x230.jpg with https://img.alicdn.com/bao/up...!! 0-item_pic.jpg_230x230.jpg

img04 The 04 number behind it will change

That is, replace http://img0*.taobaocdn.com/ with https://img.alicdn.com/

I tried some methods, but either I replaced them all or it couldn’t be replaced normally

Related labels:
php
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 Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template