1. Go to this page and download the library: Download ye/phputils library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ye / phputils example snippets
namespace App\Http\Controllers;
use Ejiayou\PHP\Utils\EjyUtils;
use Ejiayou\PHP\Utils\HTTP\HttpUtils;
use Ejiayou\PHP\Utils\Log\LogUtils;
use Ejiayou\PHP\Utils\String\UUID;
use Ejiayou\PHP\Utils\DateUtils;
use Ejiayou\PHP\Utils\EjyFileUtils;
use Ejiayou\PHP\Utils\PickSqlUtils;
use Ejiayou\PHP\Utils\WeChat\WXUtils;
class LaravelTestController extends Controller
{
public function index(){
// dd(EjyUtils::encrypt("ejiayou"));
// dd(EjyUtils::decrypt("51D75290E5A0AFE2F2F6223739E7A88CDDF47789927222AFEA0A06CD9DBE6F1C"));
// dd(EjyUtils::clientOsType());
// dd(EjyUtils::createChannelNo(8));
// dd(EjyUtils::getRealIP());
// dd(EjyUtils::makeSmsCode());
// dd(EjyUtils::isHTTPS());
// dd(EjyUtils::createChannelNo());
// dd(HttpUtils::curlGet("https://www.baidu.com"));
// LogUtils::info("这是在测试phputils");
// dd(UUID::create());
// dd(DateUtils::dateInfo('SX','1992-09-22'));
// dd(DateUtils::dateInfo('GZ','1992-09-22'));
// dd(DateUtils::dateInfo('XZ','1992-09-22'));
// dd(EjyFileUtils::dataIsMobile([1,2,3,4,5,'asd']));
// dd(EjyFileUtils::getFileData(['name'=>'test.xlsx','tmp_name'=>'C:\Users\Administrator\Desktop\test.xlsx']));
// dd(PickSqlUtils::pickTime("select * from `test` where ctime >= '2018-01-08 12:00:00' "));
$test_wx = new WXUtils('test');
// $at = $test_wx->getAccessToken();
// dd($at);
// $wp = $test_wx->getWeixinParams();
// dd($wp);
dd($test_wx->getUserInfo('oTrMfxOyljdh84HCOXiNOfqUfJmI'));
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.