Skip to content

图床,将图片上传至第三方,不占用本地空间,暂时仅支持上传到搜狗

License

Notifications You must be signed in to change notification settings

Saraiby/Upload-Image

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upload-Image

图床,将图片上传至第三方,不占用本地空间,暂时仅支持上传到搜狗

下载

Click on me to download | 点击我下载

Usage | 使用

参照 example.php 文件

<?php
require_once __DIR__."/Upload.Image.php";

$upload = new Upload_Image();

$upload->setPath(__DIR__."/img/example-1.png");
print_r($upload->sogou());//上传 /img/example-1.png 图片并打印结果
/*
输出结果
Array
(
    [code] => 0
    [msg] => success
    [url] => img02.sogoucdn.com/app/a/100520146/9d280afd3d42a606b5af530d55ae3f11
    [total_time] => 0.496954
)
*/

$upload->setPath(__DIR__."/img/example-2.png");
print_r($upload->sogou());//上传 /img/example-2.png 图片并打印结果
/*
输出结果
Array
(
    [code] => 0
    [msg] => success
    [url] => img02.sogoucdn.com/app/a/100520146/aaaea08136223002dbda7ba3f3e87e24
    [total_time] => 0.18407
)
*/

注意:url 前面可以加 http://https://

LICENSE

MIT

About

图床,将图片上传至第三方,不占用本地空间,暂时仅支持上传到搜狗

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%