摘要:
1、字符串相关 <?php echo strlen("Hello world!"); // outputs 12 字符串长度 echo str_word_count("Hello world!"); // outputs 2 单词数 echo strrev("Hello world!"); // o 阅读全文
posted @ 2021-07-06 18:30
ruclouds
阅读(91)
评论(0)
推荐(0)
摘要:
1、浏览器同源策略 浏览器出于安全考虑,规定了同源策略,不同源的客户端脚本在没有授权的情况下,不能读写对方资源;所谓同源,即协议一致、端口一致、域名一致,如果任一条不一致,既可能造成跨域; 例:http://test01.com作为请求客户端 被请求服务端 结果 原因 http://test01.c 阅读全文
posted @ 2021-07-06 18:28
ruclouds
阅读(6309)
评论(0)
推荐(1)
摘要:
一.webbench简单介绍 Webench是一款轻量级的网站测压工具,最多可以对网站模拟3w左右的并发请求,可以控制时间、是否使用缓存、是否等待服务器回复等等,且对中小型网站有明显的效果,基本上可以测出中小型网站的承受能力,对于大型的网站,如百度、淘宝这些巨型网站没有意义,因为其承受能力非常大。同 阅读全文
posted @ 2021-07-06 18:26
ruclouds
阅读(173)
评论(0)
推荐(0)
摘要:
1、滑动监听(将该js代码放入<script> </script>中 ) var startx, starty; //获得角度 function getAngle(angx, angy) { return Math.atan2(angy, angx) * 180 / Math.PI; }; //根据 阅读全文
posted @ 2021-07-06 18:24
ruclouds
阅读(445)
评论(0)
推荐(0)
摘要:
$str = '{"res":"{\"type\":\"remove\",\"title\":\"10692467199507114(验证码)\",\"packgename\":\"com.android.mms\",\"time\":\"2020-10-21 12:47:53\",\"conten 阅读全文
posted @ 2021-07-06 18:22
ruclouds
阅读(63)
评论(0)
推荐(0)
摘要:
DB::beginTransaction(); try{ DB::commit(); } catch(\Illuminate\Database\QueryException $ex){ DB::rollback(); // return $ex; } 阅读全文
posted @ 2021-07-06 18:17
ruclouds
阅读(125)
评论(0)
推荐(0)
摘要:
Laravel 可以轻松使地保护你的应用程序免受 跨站请求伪造 (CSRF) 攻击。 跨站点请求伪造是一种恶意攻击,它凭借已通过身份验证的用户身份来运行未经过授权的命令。 <form method="POST" action="/profile"> @csrf ... </form> CSRF白名单 阅读全文
posted @ 2021-07-06 18:09
ruclouds
阅读(108)
评论(0)
推荐(0)
摘要:
public function isMobile() { // 如果有HTTP_X_WAP_PROFILE则一定是移动设备 if (isset ($_SERVER['HTTP_X_WAP_PROFILE'])) { return TRUE; } // 如果via信息含有wap则一定是移动设备,部分服 阅读全文
posted @ 2021-07-06 18:04
ruclouds
阅读(196)
评论(0)
推荐(0)
摘要:
1、字段显示 ,{field:'api_status', title:'api权限', width:100, templet: '#status3',} 2、绑定样式 <script type="text/html" id="status3"> @{{# if(d.api_status==0){ } 阅读全文
posted @ 2021-07-06 18:01
ruclouds
阅读(289)
评论(0)
推荐(0)
摘要:
public function get_str(){ $length = 32; $str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $len = strlen($str)-1; $randstr = '' 阅读全文
posted @ 2021-07-06 17:57
ruclouds
阅读(1247)
评论(0)
推荐(0)
摘要:
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH step=5 for (( i = 0; i < 60; i=(i+step) )); do curl -s 阅读全文
posted @ 2021-07-06 17:56
ruclouds
阅读(802)
评论(0)
推荐(0)
摘要:
php artisan make:model Flight <?php <?php namespace App; use Illuminate\Database\Eloquent\Model; class Flight extends Model { /** * 与模型关联的表名 * * @var 阅读全文
posted @ 2021-07-06 17:54
ruclouds
阅读(43)
评论(0)
推荐(0)
摘要:
public function sql(){ $data = DB::table('users')->get();//获取所有行 $data = DB::table('users')->where('id',1)->first();//单行 $data = DB::table('users')->w 阅读全文
posted @ 2021-07-06 17:53
ruclouds
阅读(107)
评论(0)
推荐(0)
摘要:
1、请求 public function store(Request $request){ $name = $request->input('name');//接受请求 $name = $request->input('name','张三');//返回值 $input = $request->inp 阅读全文
posted @ 2021-07-06 17:43
ruclouds
阅读(158)
评论(0)
推荐(0)
摘要:
1、路由分组方式 Route::namespace('Admin')->name('admin')->group(function (){ //domain('') 域名绑定 //prefix('admin') 前缀绑定 //name('admin.') 路由名前缀 }); 2、路由 //基本路由 阅读全文
posted @ 2021-07-06 17:09
ruclouds
阅读(152)
评论(0)
推荐(0)
摘要:
1、Laravel模板中使用Ajax $.ajax({ url:"", type:"", data:{}, success:function () { var obj = JSON.parse(data); } }); # <meta name="_token" content="{{ csrf_t 阅读全文
posted @ 2021-07-06 17:03
ruclouds
阅读(303)
评论(0)
推荐(0)
摘要:
document.addEventListener("longtap", function(event) { var name = event.target.tagName; if(name "IMG") { // 下载图片 } }); 阅读全文
posted @ 2021-07-06 16:54
ruclouds
阅读(1574)
评论(0)
推荐(0)
摘要:
1、创建中间件 php artisan make:middleware AdminCheck 2、注册中间件(Kernel.php) protected $routeMiddleware = [ 'admincheck' => \App\Http\Middleware\AdminCheck::cla 阅读全文
posted @ 2021-07-06 16:52
ruclouds
阅读(43)
评论(0)
推荐(0)
摘要:
1.composer安装curl插件 composer require ixudra/curl 2.config.php配置 'providers' => array( //... Ixudra\Curl\CurlServiceProvider::class, ), 'aliases' => arr 阅读全文
posted @ 2021-07-06 16:48
ruclouds
阅读(375)
评论(0)
推荐(0)
摘要:
1、GET请求 $host = "https://ali-deliver.showapi.com"; $path = "/fetchCom"; $method = "GET"; $appcode = "apicode"; $headers = array(); array_push($headers 阅读全文
posted @ 2021-07-06 16:42
ruclouds
阅读(285)
评论(0)
推荐(0)
摘要:
1 本例使用该方法来“查找” id="demo" 的 HTML 元素,并把元素内容(innerHTML)更改为 "Hello JavaScript": document.getElementById("demo").innerHTML = "Hello JavaScript"; 2 本例通过改变 < 阅读全文
posted @ 2021-07-06 16:37
ruclouds
阅读(56)
评论(0)
推荐(0)
摘要:
if(isset($keywords['s1'])){ $getDB=DB::table('domain')->where('DomainName','like','%'.$keywords['s1']); } if(isset($keywords['s2'])){ $getDB=DB::table 阅读全文
posted @ 2021-07-06 16:26
ruclouds
阅读(241)
评论(0)
推荐(0)
摘要:
1.form表单 <form action="" method="post" enctype="multipart/form-data"> {{ csrf_field() }} <div class="form-group" style="margin-top:20px;margin-left:10 阅读全文
posted @ 2021-07-06 16:14
ruclouds
阅读(41)
评论(0)
推荐(0)

浙公网安备 33010602011771号