![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
php基础
文章平均质量分 84
张--林
这个作者很懒,什么都没留下…
展开
-
CURL上传文件
以前我们通过 PHP 的 cURL 上传文件是,是使用“@+文件全路径”的来实现的: curl_setopt(ch, CURLOPT_POSTFIELDS, array( 'file' => '@'.realpath('image.png'), )); PHP 从 5.5 开始引入了新的 CURLFile 类用来指向文件,CURLFile 类也可以详细定义 MIME 类型、文件名原创 2017-05-03 20:06:17 · 399 阅读 · 0 评论 -
Redis的PHP操作手册
String 类型操作string是redis最基本的类型,而且string类型是二进制安全的。意思是redis的string可以包含任何数据。比如jpg图片或者序列化的对象$redis->set('key','TK'); $redis->set('number','1'); $redis->setex('key',5,'TK'); //设置有效期为5秒的键值 $redis->psetex('ke原创 2018-01-17 19:25:21 · 331 阅读 · 0 评论