随笔分类 - php
摘要:1 $v){ 19 //反转并转换成小写,用空格拼接 20 $new_str .= strtolower(strrev($v))." "; 21 } 22 //去掉尾部的空格 23 $new_str = trim($new_str); 24 //循环大写的位置数组 25 foreach ($sup as $v) { 26 //将新的字符串所在的位置转换成大写 27 ...
阅读全文
摘要:1 2 3 4 5 6 7 用户名 8 密码 9 10 11 12 13 14 15 16 17 18 1 '; 50 // print_r($data);die; 51 /* 52 Array 53 ( 54 [client_id] => 101353491...
阅读全文
摘要:接口说明 /** * 初始化 * @param serverIP 必选参数 服务器地址 * @param serverPort 必选参数 服务器端口 * @param softVersion 必选参数 REST版本号 */ REST($serverIP,$serverPort,$softVersio
阅读全文
摘要:1 debug = FALSE; 31 32 $this->smtp_port = $smtp_port; 33 34 $this->relay_host = $relay_host; 35 36 $this->time_out = 30; //is used in fsockopen() 37 38 39 ...
阅读全文
摘要:1 2 3 4 5 視頻上傳 6 7 8 9 10 11 1 <?php 2 $num = $_POST['num']; 3 $tmpname = $_FILES['bolb']['tmp_name']; 4 move_uploaded_file($tmpname,"zhao-".$num); 5 if ($num==$_POS...
阅读全文
摘要:1 $appid = "101353491"; 2 3 $appkey = "df4e46ba7da52f787c6e3336d30526e4"; 4 5 $redirect_uri = "http://www.iwebshop.com/index.php"; 6 $redirect_uri = urlencode($redirect_u...
阅读全文
摘要:1 '; 50 // print_r($data);die; 51 /* 52 Array 53 ( 54 [client_id] => 101353491 55 [openid] => 7429C3FDC8FA70FEF3252FF47D6CDDA3 56 ) 57 */ 58 ...
阅读全文
摘要:1 $val){ 11 $week[] = $val['week']; 12 $cityno[] = $val['cityno']; 13 $citynm[] = $val['citynm']; 14 $temperature[] = $val['temperature']; 15 $temperaturearr[] = array((int)$val[...
阅读全文
摘要:基于角色的存取控制 (RBAC) 基于角色的存取控制 (RBAC) 提供了一个简单而强大的集中式存取控制机制。 详细的关于 RBAC 和诸多传统的存取控制方案对比的详情,请参阅 Wikipedia。 Yii 实现了通用的分层的 RBAC,遵循的模型是 NIST RBAC model. 它通过 aut
阅读全文
摘要:server = new swoole_websocket_server(self::HOST, self::PART); //监听连接事件 $this->server->on('open', [$this, 'onOpen']); //监听接收消息事件 $this->server->on('message', [$this, 'o...
阅读全文
摘要:1 public function ajaxxiu(request $request) 2 { 3 $id = $request->post('id'); 4 $fd = $request->post('fd'); 5 $new_val = $request->post('new_val'); 6 $res = DB::table('users')->...
阅读全文
摘要:1 2 3 4 5 7 8 展示頁面 9 10 11 12 數據展示頁面 13 14 15 {{--@csrf--}} 16 17 18 編號 19 用戶名 20 性別 21 郵箱 22 創建時間 23 ...
阅读全文
摘要:1 //控制器層 2 3 public function ajaxsex(request $request) 4 { 5 $id = $request->get('id'); 6 $fd = $request->get('fd'); 7 if ($fd=="男"){ 8 $fd="女"; 9 DB::table("use...
阅读全文
摘要:1 //控制器層 2 public function update(request $request) 3 { 4 $id = $request->get('id'); 5 $data = DB::select("select * from users where id='$id'"); 6 $data = json_encode($data); 7 ...
阅读全文
摘要:1 post('page') ? $request->post('page') : 1; 19 //每頁顯示條數 20 $size = 3; 21 //查詢數據總條數 22 $count = count(DB::select("select * from week_type")); 23 //查詢數據總頁數 24 ...
阅读全文
摘要://控制器層 //模型層 //視圖層 //註冊頁面
阅读全文
摘要://控制器層 //分頁 public function list_january_table(){ //設置當前頁 $page = input("post.page") ? input("post.page") : 1; //設置每頁顯示條數 $size = 3; //查詢總條數 $num = Db
阅读全文