Home  >  Article  >  Backend Development  >  Recommended to cache remote source code

Recommended to cache remote source code

巴扎黑
巴扎黑Original
2017-06-14 13:36:121248browse

1. CURL cache remote file class

Recommended to cache remote source code

##Introduction: CURL cache Remote file code sharing

2. Cache remote QR code images to local

Introduction: Step 1 , the following code is thrown into functions.php function get_qr($url,$path,$qrpic){ set_time_limit (10); //Set ten seconds timeout $destination_folder = $path?$path.'/':''; $localname = $destination_folder .$qrpic; $file = fopen ($url, "rb"); //r+ mode of fopen function: read

3. CURL cache remote file Class

Recommended to cache remote source code

## Introduction: CURL cache remote file class

[Related Q&A recommendations]:

Design Pattern - Java Performance Optimization Notes (2) Design Optimization

The above is the detailed content of Recommended to cache remote source code. 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