01 2019 档案
摘要:打开网页http://lbsyun.baidu.com 滑到最底下点击申请密钥 复制密钥,找到下列代码第八行把密钥两字换成自己的密钥即可 <html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /
阅读全文
摘要:在application\config.php里加 //以下为静态缓存配置 'app_debug' => false,//false为开启静态缓存模式 'html_cache_on' => true, // 开启静态缓存 'html_cache_time' => 7200, // 全局静态缓存有效期
阅读全文
摘要:use think\cache; public function index(){ //Cache::get('name')获取缓存,如果name值不存在则返回false; if (Cache::get('name')){ echo "<script>alert('旧缓存');</script>"
阅读全文
摘要:视图层 route 中文 路由 <a href="{{route('cc',array('id'=>11111))}}">446454</a> 路由层 Route::get('当前路径','控制器@方法')->name('cc'); 控制器 use Illuminate\Http\Request;/
阅读全文
摘要:Laravel 框架使用 Composer 来管理其依赖性。所以,在你使用 Laravel 之前,你必须在你电脑上是否安装了 Composer。最简单的获取Composer的方式就是百度之,百度关键字“composer-setup.exe”即可。 注:安装Composer前要先确定电脑里有没有配置p
阅读全文
摘要:POST方式接收 视图层 <form action="/submit" method="post"> {{csrf_field()}} //必加 <input type="text" name="a"></input> <input type="text" name="b"></input> <in
阅读全文
摘要:在接收值前面加上这段代码 ,修改格式 header("Content-Type: text/html;charset=utf-8");
阅读全文
摘要:翻译过来就是 期望参数1是字符串 意思就是说变量为数组,应以数组的方式输出 @foreach($xxx as $k=>$y) {{$k}}{{$y}} @endforeach
阅读全文
摘要:@foreach($xxx as $k=>$y) {{$y->id}} @endforeach
阅读全文
摘要:DB::table('表名')->get(); //查询表里的所有数据 DB::table('表名')->where()->find(需要查询的条数); 查询单或多条数据 DB::table('表名')->insert(要添加的数据); 在表里添加一条数据 DB::table('表名')->wher
阅读全文
摘要:<?php namespace App\Http\Controllers; use App\Index; use App\Http\Controllers\Controller; class IndexController extends Controller{ public function in
阅读全文
摘要:目录 App\Models 没有就自己创一个 创建对应控制器的php文件,首字母大写 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; clas
阅读全文
摘要:目录 routes\web.php 初始路由,直接渲染视图welcome,即V层 '/'为路径:www.xxx.com/ Route::get('/', function () { return view('welcome'); }); 直接渲染视图welcome,即V层 'home'为路径:www
阅读全文
摘要:目录 app\config\app.php 找到 'timezone' =>'',在双引号里加上PRC(中华人民共和国缩写)即可;
阅读全文
摘要:laravel MVC分布 M app\Http\Middleware V resources\views C app\Http\Controllers 数据库配置 目录 config\database.php 根据自己所需要的选取并修改ip地址,以及在第16行的default里设置自己需要的数据库
阅读全文
摘要:1、ls 命令 ls 列出当前目录的所有文件 ls -a 列出当前目录的所有文件,包括以 . 开头的隐藏文件 ls -r 列出当前目录的所有文件,倒序 ls -t 以文件修改的时间排序 ls -S 以文件大小排序 cd .. 返回上级目录 php -v 查看当前版本 find 查找范围 -name
阅读全文