- 博客(52)
- 收藏
- 关注
原创 在模板中使用U方法生成的url会有index.php,怎么把index.php隐藏掉
原文链接:http://www.thinkphp.cn/topic/14888.html
2019-07-28 23:54:26
874
原创 好用的LINUX日志分析工具
好用的LINUX日志分析工具点击这里:https://help.aliyun.com/knowledge_detail/36376.html
2019-07-19 09:01:36
1230
原创 主机屏蔽IP地址的方法可参考
虚拟主机屏蔽IP地址的方法可参考https://help.aliyun.com/knowledge_detail/36226.html
2019-07-19 08:58:20
958
原创 phpspreadsheet 操作指南
thinkphp5 整合PhpSpreadsheet详解PhpSpreadsheet设置单元格phpspreadsheet开发手记
2019-07-08 10:56:32
3542
原创 CI的坑
Index作为保留字不能被用作控制器的名称,评论区有指出,我在这个地方浪费了时间;php 500錯誤 可能是項目默認關閉了php error可以從文件中的.env.example中打開;隐藏index.php:建议使用nginx 的 laravel重写路由规则;//CI文档的评论区有;Apache的话官方文档写的比较混淆,评论区有正确的;...
2019-06-05 22:49:47
270
原创 七牛云对象存储之配置CNAME
目的:七牛云绑定域名,并且设置CNAME域名必须备案成功了才可以使用的简单说一下绑定了域名的作用:我们在七牛云上存储了图片文件什么的,访问地址都需要加上一个域名的。起初我们开通对象存储的时候,七牛云会给我们一个测试域名。但是测试域名会被收回,公告如下:所以我们需要用我们自己的二级域名来绑定七牛云进行访问(最好不用www开头的二级域名来绑定,因为www开头的域名,我们都是作为主域名的)第...
2019-04-29 12:43:10
2348
原创 npm安装Webpack及打包js文件命令
npm initnpm install webpack --save-dev -g //必须加上 -g 全局安装npm install --save-dev webpack-cli -gwebpack hello.js -o hello.bundle.js --mode development
2019-04-22 00:05:37
2255
转载 分享记录两个英文自然语言处理的工具包
在这里总结、记录两个英文自然语言处理的工具包,具体怎么使用可以看文档。一、NLTKhttp://www.nltk.org/二、spaCyhttps://spacy.io/
2019-04-18 21:16:37
286
原创 Artisan控制台
Artisan简介简介Articsn是Laravel中自带的命令行工具名称由强大的Symfony Console 组件驱动的提供了一些对应开发有帮助的命令Artisan使用帮助查看所有可用的Artisan的命令(list)php artisanphp artisan list查看命令的帮助信息(help)php artisan help migrateAr...
2019-04-16 12:15:33
216
原创 Laravel-通过模型处理性别
Student模型中定义常量class Student extends Model{ const SEX_UN = 0; //未知 const SEX_BOY = 1; //男 const SEX_GIRL = 2; //女 protected $table = 'student'; protected $fillable = ['name', '...
2019-04-13 23:59:09
1023
原创 Laravel-表单验证及数据保持详解
第一种:控制器验证控制器内容if ($request->isMethod('POST')) { $this->validate($request, [ 'Student.name' => 'required|min:2|max:20', 'Student.age' => 'required|integer...
2019-04-13 23:06:24
1437
原创 laravel框架Controller之Middleware
中间件有什么用Laravel中间件提供一个方便的机制来过滤进入应用程序的HTTP请求场景有一个活动,在指定日期后开始,如果活动没开始只能访问宣传页面新建中间件注册中间件使用中间件中间件的前置和后置操作...
2019-04-11 22:21:26
527
转载 php语言中输出时间与本地时间不一致的问题
按照输出 年-月-日 时:分:秒运行后发现时间与本地时间不一致,细心的你可能会发现时间大概相差八小时左右,这是时区的问题,解决方法有两种:第一种:代码中写入:date_default_timezone_set('PRC');建议用此方法。第二种:在php.ini 文档中设置:date.timezone = PRC注意:进入php文件夹发现可能没有php.ini,却有php.ini...
2019-04-10 23:04:35
363
转载 如何让linux时间与internet时间同步(centos)
笔者在使用linux时(虚拟机),经常会发现使用一段时间后,linux时间和我的宿主机(真实机)的时间不一致,而宿主机的时间确实是internet时间,安装linux时选择的时区也是Asia/Shanghai,那么今天我分享的即为如何让linux时间与internet时间同步在解决问题之前,我们首先来了解下面几个知识点:date命令:#date显示系统时间2.hwclock命令 ...
2019-04-10 22:53:13
210
原创 Laravel中Controller之Response
相应的常见类型字符串视图Json重定向字符串和视图我们都知道,这届重点讲解Json和重定向响应Json助手函数response()->json$data = [ 'errorCode' => 0, 'errMsg' => 'success', 'data' => 'sean'];return response(...
2019-04-10 22:16:08
698
原创 laravel框架Controller之Requset
laravel框架Controller之RequsetLaravel中的请求使用的时Symfony/http-foundation组件input() 获取请求的值public function requset1(Request $request) //这种方式叫依赖注入,Illuminate\Http\Request{ echo $request->input('sex','...
2019-04-09 23:49:03
480
原创 laravel之Blade模板引擎
**Blade模板引擎介绍**模板继承涉及的知识点:section,yield,extends, partent
2019-04-09 22:59:21
768
原创 laravel ORM 模型
laravel ORM 模型的建立在App目录下新建模型namespace APP;use Illuminate\Database\Eloquent\Model;class Student extends Model{ //指定表名,默认是model名的复数,如Student -> students protected $table = "student";...
2019-04-07 23:42:04
872
原创 laravel查询构造器
首先namespace App\Http\Controllers;use Illuminate\Support\Facades\DB;class StudentController extends Controller插入 $bool = DB::insert('insert into student(name, age) values(?,?)', ['imooc', 18...
2019-04-07 16:34:40
501
原创 laravel中使用DBfacade实现CURD
首先引入相应的类namespace App\Http\Controllers;use Illuminate\Support\Facades\DB;class StudentController extends Controller插入 $bool = DB::insert('insert into student(name, age) values(?,?)', ['imooc',...
2019-04-07 13:24:40
286
原创 laravel模型创建
直接在 app\目录下创建model文件;namespace App;use Illuminate\Database\Eloquent\Model;class Member extends Model{ public static function getMember() { return 'member name is sean'; }...
2019-04-06 16:27:36
401
原创 laravel新建视图文件
创建及访问视图1./resources/下新建文件,如member-info.php;2.视图文件写入内容;3.控制器 return view(‘member-info’);4.创建路由 Route::get(‘member/info’, [‘uses’ => ‘MemberController@info’]);5.游览器url输入:域名/member/info即可访问视图6.注...
2019-04-06 16:06:08
687
原创 laravel 路由规则及小坑
laravel 5.8.3的web路由在 /route/web.php中;//基础路由Route::get('/', function () { return view('welcome');});//基础路由 Route::get('basic1', function() { return 'Helloworld';}); //基础路由 Route::post...
2019-04-06 15:14:03
1661
原创 laravel require(): open_basedir restriction in effect. File(/www/wwwroot/你网站根目录/vendor/autoload.php
require(): open_basedir restriction in effect. File(/www/wwwroot/【你网站根目录】/vendor/autoload.php) is not within the allowed path1.是不是根本就不存在vendor/autoload.php文件或vendor文件夹?查看这篇文章2.如果存在vendor/autoload.p...
2019-04-06 13:32:50
6622
原创 composer无法安装 laravel的 vendor目录
laravel异常:[Symfony Component Process Exception RuntimeException] The Process class relies on proc_open, which is not available on your PHP installation#laravel new blogCrafting application…[Symfony...
2019-04-06 13:05:54
2044
原创 php的mkdir函数在linux中目录权限分配无效原因分析
在linux系统中,root帐号执行php命令:mkdir(‘test’, 0777);结果文件的权限依然为:drwxr-xr-x 2 root root Jul 27 19:30 testdrwxr-xr-x表示权限是0755,并没有达到想要的效果。分析原因:linux系统创建文件/文件夹时有一个默认权限,此权限受 umask 设置影响,默认配置在/etc/bashrc配置文件中...
2019-03-20 13:19:17
661
原创 详解spl_autoload_register()函数
原文链接:https://blog.youkuaiyun.com/qq_31648761/article/details/78272216
2019-03-17 14:10:10
213
转载 LNMP TP 宝塔 require(): open_basedir restriction in effect,解决方法:关闭防跨站攻击。
Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/thinkphp/start.php) is not within the allowed path(s): (/www/wwwroot/public/:/tmp/:/proc/) in /www/wwwroot/public/index.php on...
2019-03-09 23:10:46
2185
转载 Yii2获取model->save()错误信息中的第一条的方法
//获取 Model 错误信息中的 第一条,无错误时 返回 nullpublic static function getModelError($model) {errors = errors = errors = model->getErrors();
2019-02-11 15:37:17
1776
转载 Yii2在nginx部署上的坑:非index默认页都报404解决办法
自己在开始在apache上搭建的,一切测试正常,结果转移到nginx平台后,发现里面的链接点击全部提示404,第一反应是.htaccess规则没有正常加载,开始尝试自己改写规则,结果没成功,后来发现,nginx平台下需要额外配置yii rewrite规则,配置如下:在nginx 的配置文件nginx.conf(wdcp部署的多站点的,在对应nginx安装目录下vhost里找对应的conf文件)...
2019-02-03 17:40:03
1579
转载 php二维数组转字符串
function arr2str (KaTeX parse error: Expected '}', got 'EOF' at end of input: …{ foreach (arr as $v){v=join(",",v = join(",",v=join(",",v); //可以用implode将一维数组转...
2019-01-06 19:44:53
519
原创 整合Apache常用配置
1.配置alias别名:httpd.conf:Alias /E “E:/”<Directory “E:/”>Options +Indexes +FollowSymLinks +ExecCGIAllowOverride AllOrder allow,denyAllow from allRequire all granted2.配置虚拟主机:第一步:vi conf/...
2019-01-02 23:31:21
192
原创 解决新版chrome无法手动拖动安装插件
原文链接:https://blog.youkuaiyun.com/achenyuan/article/details/81485092
2019-01-01 11:07:48
2370
转载 PHP的4种运行模式
SAPI(Server Application Programming Interface)服务器应用程序编程接口,即PHP与其他应用交互的接口,PHP脚本要执行有很多方式,通过Web服务器,或者直接在命令行下,也可以嵌入在其他程序中。SAPI提供了一个和外部通信的接口,常见的SAPI有:cgi、fast-cgi、cli、apache模块的DLL、isapiCGICGI 即通用网关接口(...
2018-12-31 22:15:48
338
原创 UEFI装机指南
UEFI装机:工具:U盘,‘解压’ 的ISO文件(单独放到该U盘)1.进入BIOS1.1 Security->secure boot(开启)1.2 boot prority改成UEFI;1.3 csm(关闭);1.4 boot mode->fast(或者uefi);2.进入PE工具2.1 打开傲梅(分区助手);2.2 格式化硬盘(建议整个硬盘格式化);2.3 右键-...
2018-11-28 15:00:05
2301
原创 远程仓库的创建|删除|重命名
远程仓库命名 origin (约定俗成)git remote 列出远程仓库名git remote add [name] +RepoUrl 添加远程仓库(名)git remote rename [old_name] [new_name] 重命名远程仓库(名)git remote rm [name] 删除远程仓库(名)...
2018-11-28 00:45:05
320
原创 git标签管理(通常用于版本发布)
标签管理git tag 查看所有标签git tag [name] 创建标签git tag -a [name] -m ‘comment’ 制定提交信息git tag -d [name] 删除标签git push origin [name]
2018-11-28 00:02:05
506
原创 apache(.htaccess文件)路由重定向配置步骤
1.在项目根目录文件夹下面新建.htaccess文件(apache重写);.htaccess文件内容如下:<IfModule mod_rewrite.c>RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]</IfModule>...
2018-11-23 00:12:45
2670
转载 把.vagrant.d移出系统盘
使用vagrant up启动虚拟机的时候,打包的虚拟机会保存在.vagrant.d/boxes目录下,这个文件夹默认是存放在系统盘上的C:/Users/Admin目录下的,如果box文件非常多的话,会给系统盘造成很大的压力,所以我们可以把.vagrant.d文件夹移到别的盘。1、将.vagrant.d文件夹剪切到别的盘,比如d:/software/vagrant/.vagrant.d2、设置环境变...
2018-10-15 11:26:10
1056
转载 TP中limit()参数注意
参数为n n为正整数 result=WebsiteModel::limit(1)−>select();显示1条记录result=WebsiteModel::limit(1)−>select();显示1条记录result = WebsiteModel::limit(1)->select(); 显示1条记录 result = WebsiteModel::limit(10)-&g...
2018-09-15 10:28:08
5818
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人