TP
猿学
勤而奋学,路方为坦途
展开
-
thinkphp5、thinkphp6命令行command执行控制器方法
最近做数据采集时总会遇到接口执行一段时间之后请求时间过长报404,命令行执行的完美解决这一问题,但之前没做过命令行执行thinkphp方法,找了好多资料,踏了不少坑,终于找到解决方法,下面将代码贴在下面特别鸣谢这一大神原文地址:tp5和tp6使用cli(cmd)模式调用控制器 | 时刻需tp51.command代码如下<?php/** * Created by 大师兄 * 派系: 神秘剑派 * 技能: zxc * Date: 2021/12/13 * Time: 1.转载 2022-03-18 11:52:10 · 5870 阅读 · 2 评论 -
ThinkPHP6 ajax多文件上传
ThinkPHP6 ajax多文件上传HTML文件:<form enctype="multipart/form-data"> <input class='form-control' id='file_name' name='file_name[]' type="file" multiple> <button type="button" class...原创 2020-04-20 15:16:24 · 1616 阅读 · 0 评论 -
ThinkPHP获取网站根目录
ThinkPHP获取网站根目录$d = $_SERVER['DOCUMENT_ROOT']; dd($d) 打印网站根目录;原创 2020-04-16 10:40:49 · 2422 阅读 · 0 评论 -
tp5 Nginx隐藏index.php的配置方法
tp5 Nginx隐藏index.php的配置方法location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s=$1 last; break; }}本地phpstudy配置方法location / { if (!-e $request_...原创 2020-03-28 16:34:51 · 1316 阅读 · 0 评论 -
ThinkPhp5 delete方法ajax删除数据资源路由链接写法
ThinkPhp5 delete方法ajax删除数据资源路由链接写法HTML<html><head> <title>文章管理</title> <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"> </scri..原创 2019-01-14 17:58:00 · 1193 阅读 · 0 评论 -
ThinkPhp5 save方法保存数据demo实例
ThinkPhp5 save方法保存数据demo实例路由器Route::resource('article', 'article/index');添加跳转链接<a href="create">添加</a>控制器中create方法/** * 显示创建资源表单页. * * @return \think\Re...原创 2019-01-15 14:24:28 · 3288 阅读 · 0 评论 -
ThinkPhp5 图片上传实例
ThinkPhp5 图片上传实例HTML<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>文章添加</title> <script src="https原创 2019-01-29 17:35:31 · 5042 阅读 · 0 评论 -
ThinkPhp5 No input file specified
ThinkPhp5 No input file specified怎么解决原因可能是访问路径不对,查看日志文件.\runtime\log里访问路径输入正确路径即可。原创 2019-02-13 10:04:26 · 510 阅读 · 0 评论