hehexu

博客园 首页 新随笔 联系 订阅 管理

12 2017 档案

摘要:function showImage($url, $width='', $height=''){ if(empty($url)) return ; $url = C('IMG_URL').$url; if($width) $width = "width='$width'"; if($height) 阅读全文
posted @ 2017-12-31 21:50 hehexu 阅读(92) 评论(0) 推荐(0) 编辑

摘要:先选中移动内容 块向右移动:Tab键 块向左移动:Shift + Tab键ctrl+/行注释ctrl+shift+/块注释ctrl+g跳转行alt + 上/下 键实现在类中的方法切换ctrl +点击方法 跳转到对应的方法ctrl+alt+向左箭头 实现方法跳转后跳回ctrl + home 跳转到文档 阅读全文
posted @ 2017-12-31 20:28 hehexu 阅读(326) 评论(0) 推荐(0) 编辑

摘要:public static function encodeXml($data){ $attr = $xml = ""; foreach($data as $key => $value){ if(is_numeric($key)){ $attr = " id='{$key}'"; $key = "it 阅读全文
posted @ 2017-12-30 19:57 hehexu 阅读(269) 评论(0) 推荐(0) 编辑

摘要:今天碰到一个处理文件特殊字符的事情,再次注意到这个问题,在php中: * 以单引号为定界符的php字符串,支持两个转义\'和\\ * 以双引号为定界符的php字符串,支持下列转义: \n 换行(LF 或 ASCII 字符 0x0A(10)) \r 回车(CR 或 ASCII 字符 0x0D(13)) 阅读全文
posted @ 2017-12-30 17:23 hehexu 阅读(1895) 评论(0) 推荐(0) 编辑

摘要:filemtime() 函数: filemtime() 函数返回文件内容上次的修改时间。 若成功,则时间以 Unix 时间戳的方式返回。若失败,则返回 false。 fileatime() — 取得文件的上次访问时间 filemtime() — 取得文件修改时间 fileowner() — 取得文件 阅读全文
posted @ 2017-12-30 09:13 hehexu 阅读(399) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-29 23:13 hehexu 阅读(118) 评论(0) 推荐(0) 编辑

摘要:require 的使用方法如 require("MyRequireFile.php"); 。这个函数通常放在 PHP 程序的最前面,PHP 程序在执行前, 就会先读入 require 所指定引入的文件,使它变成 PHP 程序网页的一部份。常用的函数,亦可以这个方法将它引入网页中。 include 使 阅读全文
posted @ 2017-12-29 11:02 hehexu 阅读(198) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-29 07:13 hehexu 阅读(133) 评论(0) 推荐(0) 编辑

摘要:1. 在count 不重复的记录的时候能用到,比如 就是计算talbebname表中description不同的记录有多少条。 阅读全文
posted @ 2017-12-28 16:25 hehexu 阅读(111) 评论(0) 推荐(0) 编辑

摘要:offset() 一、语法 1、 返回偏移坐标 $(selector).offset(); top: $(selector).offset().top; left: $(selector).offset().left; 获取匹配元素在当前视口的相对偏移。 总是计算相对于文档的位置,无论元素的父元素或 阅读全文
posted @ 2017-12-28 12:47 hehexu 阅读(165) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-28 10:03 hehexu 阅读(117) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-28 09:01 hehexu 阅读(89) 评论(0) 推荐(0) 编辑

摘要:1.添加PRIMARY KEY(主键索引) mysql>ALTER TABLE `table_name` ADD PRIMARY KEY ( `column` ) 2.添加UNIQUE(唯一索引) mysql>ALTER TABLE `table_name` ADD UNIQUE ( `column 阅读全文
posted @ 2017-12-28 08:50 hehexu 阅读(139) 评论(0) 推荐(0) 编辑

摘要:UPDATE php34_goods SET is_delete = 1 //表名和表中字符串都不需要使用‘’,使用后有可能到制错误。 阅读全文
posted @ 2017-12-27 20:44 hehexu 阅读(153) 评论(0) 推荐(0) 编辑

摘要:array_fill (PHP 4 >= 4.2.0, PHP 5, PHP 7) array_fill — 用给定的值填充数组 array_fill (PHP 4 >= 4.2.0, PHP 5, PHP 7) array_fill — 用给定的值填充数组 说明 array array_fill 阅读全文
posted @ 2017-12-27 20:34 hehexu 阅读(116) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-27 19:31 hehexu 阅读(115) 评论(0) 推荐(0) 编辑

摘要:1.需要phpmail邮件发送包, 2.邮件发送函数function sendMail($to, $title, $content){ require_once('./PHPMailer_v5.1/class.phpmailer.php'); $mail = new PHPMailer(); // 阅读全文
posted @ 2017-12-27 14:36 hehexu 阅读(158) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-27 14:19 hehexu 阅读(128) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-27 11:52 hehexu 阅读(107) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-27 11:14 hehexu 阅读(120) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-26 15:40 hehexu 阅读(97) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-26 14:55 hehexu 阅读(134) 评论(0) 推荐(0) 编辑

摘要:1.结束xshsll前台执行 ctrl+c。 /etc/group文件包含所有组 /etc/passwd 查看系统中所有用户 一. 备份数据库(如: test): ①可直接进入后台即可.(MySQL的默认目录:/var/lib/mysql ) ②输入命令: [root@obj mysql]# mys 阅读全文
posted @ 2017-12-26 09:37 hehexu 阅读(116) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-23 23:45 hehexu 阅读(139) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-23 12:41 hehexu 阅读(120) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-22 17:07 hehexu 阅读(185) 评论(0) 推荐(0) 编辑

摘要:1. <input type=file> 2. html+=v.attr_name+' : '; html+="<a href='javascript:void(0)' onclick='addrow(this)'>[+]</a>"; html+="<select name=ga["+v.id+"] 阅读全文
posted @ 2017-12-22 12:52 hehexu 阅读(152) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-22 09:22 hehexu 阅读(136) 评论(0) 推荐(0) 编辑

摘要:time():返回unix时间戳。 date(): 格式化一个本地时间/日期 date(): 格式化一个本地时间/日期 getdate — 取得日期/时间信息: strtotime : 将任何英文文本的日期时间描述解析为 Unix 时间戳 echo strtotime('10:55:1 2011-1 阅读全文
posted @ 2017-12-19 10:51 hehexu 阅读(151) 评论(0) 推荐(0) 编辑

摘要:大家知道,Session储存在服务器端,根据客户端提供的SessionID来得到这个用户的文件,然后读取文件,取得变量的值,SessionID可以使用客户端的Cookie或者Http1.1协议的Query_String(就是访问的URL的“?”后面的部分)来传送给服务器,然后服务器读取Session 阅读全文
posted @ 2017-12-15 21:11 hehexu 阅读(178) 评论(0) 推荐(0) 编辑

摘要:文件上传前 php文件上传分为单文件上传和多文件上传, <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="__URL__" 阅读全文
posted @ 2017-12-11 22:27 hehexu 阅读(149) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2017-12-11 20:29 hehexu 阅读(135) 评论(0) 推荐(0) 编辑

摘要:Window 对象 Window 对象 Window 对象表示浏览器中打开的窗口。 如果文档包含框架(frame 或 iframe 标签),浏览器会为 HTML 文档创建一个 window 对象,并为每个框架创建一个额外的 window 对象。 注释:没有应用于 window 对象的公开标准,不过所 阅读全文
posted @ 2017-12-11 08:08 hehexu 阅读(154) 评论(0) 推荐(0) 编辑

摘要:$("select[name=type_id]").change(function(e) { var val=$(this).val(); $.ajax({ type:'GET', url:'__CONTROLLER__/ajaxtype', data:{'val':val}, //第二个代表变量两 阅读全文
posted @ 2017-12-10 15:00 hehexu 阅读(147) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示