PHP
rainbow-0
PHP渣渣一个
展开
-
thinkphp5 excel导入导出
1.类库下载composer require phpoffice/phpexcel2.导入public function import(){if(request()->isPost()){$result = [‘status’=>false, ‘msg’=>‘操作失败’];$file = request()->file(‘file’);$file_name = $file->getInfo()[‘name’];//文件名称$file_size = $file-原创 2022-07-29 13:38:37 · 834 阅读 · 0 评论 -
公众号-获取用户信息
```php```php<?phpnamespace app\index\controller;use think\Controller;class Index extends Controller{ public function index() { $appid = config('params.appid');//自己的appid if (!session('?userinfo')) { if (!isset($_GET['code'])) {//没有c.原创 2021-06-17 15:37:23 · 72 阅读 · 0 评论 -
公众号-token验证
1.验证代码<?phpnamespace app\index\controller;use think\Controller;define("TOKEN","ab123456");//自己设置的Token,与公众号种填写一致class Index{ public function index(){ $echoStr = $_GET["echostr"]; if ($this->checkSignature()) { ec原创 2021-06-17 15:05:26 · 92 阅读 · 0 评论 -
nginx 半自动平滑升级
所谓半自动,其实就是在最后迁移的时候使用源码自带的升级命令:make upgrade 来自动完成1、需要下载对应的需要加载的第三方的扩展,或者是需要附加设置的参数 (注意:之前的配置参数要保留) --add_module=PATH 添加第三方扩展例: wget https://github.com/weibocom/nginx-upsync-module/archive/v...原创 2019-10-23 16:07:20 · 148 阅读 · 0 评论 -
PHP文件上传
1、页面部分&amp;amp;lt;form class=&amp;quot;payadd&amp;quot; action=&amp;quot;&amp;quot; method=&amp;quot;post&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;amp;原创 2018-11-02 15:45:14 · 124 阅读 · 0 评论