Giter Site home page Giter Site logo

aliyun-php's Introduction

使用教程

这是基于thinkphp的 如果需要集成到其他框架 看看代码思路转换应该不难

Oss.class.php


    放到thinkphp  Think\Upload\Driver目录下  
    
    C('FILE_UPLOAD_TYPE','Oss');

    $oss_config = array(
        'region'=>'bucket.oss-cn-shenzhen',//节点
        'access_id'  => '', //阿里云Access Key ID
        'access_key' => '', //阿里云Access Key Secret
        'bucket'     => 'bucket',//bucket
     );  
    $upload = new Upload($config, 'Oss', $oss_config);

Alisms.class.php


    放到thinkphp  Library\Extend目录下  
    $sms_config = array(
        'accessKeyId'  => '', //阿里云Access Key ID
        'accessKeySecret' => '', //阿里云Access Key Secret
        'signName' => 'test',
        'templateCode' => 'SMS_00000002',
     );
    $sms= new Alisms($sms_config);
    $tel=15888888888;
    $code=1234;
    $status = $sms->send_verify($tel, $code);
    if (!$status){
        echo 'error';
    }

aliyun-php's People

Contributors

knisy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.