dongxiong.net
未注册HTTP/1.1 301 永久重定向 访问时间:2013年11月16日 15:20:43 服务器:Apache/2.2.16 语言环境:PHP/5.3.3-7+squeeze17 X-Pingback: http://dongxiong.net/xmlrpc.php 目标网址:http://dongxiong.net/ 动作:Accept-Encoding Content-Encoding: gzip 文件大小:20 Keep-Alive: timeout=15, max=100 连接:Keep-Alive 类型:text/html; charset=UTF-8 HTTP/1.1 200 OK 访问时间:2013年11月16日 15:20:43 服务器:Apache/2.2.16 语言环境:PHP/5.3.3-7+squeeze17 X-Pingback: http://dongxiong.net/xmlrpc.php 动作:Accept-Encoding Content-Encoding: gzip 文件大小:6970 Keep-Alive: timeout=15, max=100 连接:Keep-Alive 类型:text/html; charset=UTF-8 网站编码:UTF-8
该域名无法解析为IP
Dongxiong's blog首页关于订阅副作用和顺序点2013年11月3日 •admin •属于C语言分类副作用(side effect)副作用是指对数据对象或文件的修改。顺序点(sequence point)一个顺序点是程序执行中的一点;在该点处,所有的副作用都在进入下一步前被计算。以下是顺序点存在的位置:函数调用时,在所有实际参数求值之后;在以下运算符的第一个操作数末尾:逻辑运算符(&&)、逻辑运算符(||)、三元运算符(?)和逗号运算符(,)。— The end of a full declarator: declarators;— The end of a full expression: an initializer; the expression in an expression statement; the controlling expression of a selection statement (if or switch); the controlling expression of a while or do statement; each of the expressions of a for statement; the expression in a return statement.在一个库函数返回之前。— After the actions associated with each formatted input/output function conversion specifier.— Immediately before and immediately after each call to a comparison function, and also between any call to a comparison function and any movement of the objects passed as arguments to that call.— The call to a function, after the arguments have been evaluated (6.5.2.2).— The end of the first operand of the following operators: logical AND && (6.5.13); logical OR || (6.5.14); conditional ? (6.5.15); comma , (6.5.17).— The end of a full declarator: declarators (6.7.5);— The end of a full expression: an initializer (6.7.8); the expression in an expression statement (6.8.3); the controlling expression of a selection statement (if or switch) (6.8.4); the controlling expression of a while or do statement (6.8.5); each of the expressions of a for statement (6.8.5.3); the expression in a return statement (6.8.6.4).— Immediately before a library function returns (7.1.4).— After the actions associated with each formatted input/output function conversion specifier (7.19.6, 7.24.2).— Immediately before and immediately after each call to a comparison function, and also between any call to a comparison function and any movement of the objects passed as arguments to that call (7.20.5).暂无评论 »Laravel 4重写freshTimestamp方法无效2013年6月1日 •admin •属于PHP分类默认情况下Laravel 4的Eloquent会自动处理数据库表中的created_at和updated_at字段,前提是你在数据库表中以datetime类型建立这两个字段。Laravel 4官方文档提到If you wish to customize the format of your timestamps, you may override the freshTimestamp method in your model大意就是如果你希望自定义时间的格式,可以在model里面重写freshTimestamp方法。之前一直习惯在数据库中保存时间戳。在Laravel 4还是Beta版的时候,我在数据表中添加了类型为int的created_at和updated_at字段,并重写freshTimestamp为public function freshTimestamp(){return time();}这样就可以在数据库中保存时间戳。但是,今天在Lavavel 4正式版中使用同样的代码及数据库表却无法保存时间戳,只保存了2013字样。在代码中输出时间,结果形如2013-06-10 17:51:48,而数据库表中的created_at和updated_at字段类型为int,所以string类型被强制转换为int类型,只保存了2013字样。可是,为什么在代码中输出的时间会是2013-06-10 17:51:48呢?继续阅读 »该文章被贴了Laravel、PHP标签。 暂无评论 »PHP DOMDocument类处理utf-8字符2013年5月9日 •admin •属于PHP分类如下代码,输出会乱码:$html = '一些中文';$dom = new DomDocument();$dom->loadHTML($html);echo $dom->saveHTML();可以在调用loadHTML方法前,对html进行处理$html = preg_replace_callback('/[\x{80}-\x{10FFFF}]/u', function($match) {list($utf8) = $match;$entity = mb_convert_encoding($utf8, 'HTML-ENTITIES', 'UTF-8');// printf("%s -> %s\n", $utf8, $entity);return $e
© 2010 - 2020 网站综合信息查询 同IP网站查询 相关类似网站查询 网站备案查询网站地图 最新查询 最近更新 优秀网站 热门网站 全部网站 同IP查询 备案查询
2025-05-04 10:13, Process in 0.0062 second.