Quantcast
Channel: Bun Wong's Blog
Browsing latest articles
Browse All 10 View Live

cron 下如何设置 PHP CGI 超时

最近在 Drupal 上写了一些 hook_cron,里面执行了一些长时间脚本(如采集、发邮件),然而尽管我在脚本里设置了 set_time_limit(0),到了 30 分钟左右脚本就会强行终止,找了一些资料,发现 set_time_limit 在 CLI 方式下可能无效,加入 ini_set('max_execution_time', 0) 后问题解决 :D

View Article



Drupal 7 form 使用 File Field

在 D7 下由于整合了 CCK,只需要安装 Field Module 和 File Module 就能实现文件上传,然而由于 CCK 的字段数据结构太过复杂(每个 CCK field 都有一个定义表 field_config、实例表 field_config_instance 和字段数据表,同时文件 Field 也有一个文件表 file_managed),在项目里我只直接保存了文件目标路径...

View Article

Finance Module 简单记账模块 for Drupal 7.x

这两天应老婆要求简单写了个记账模块 Finance Module,包括账户管理 (account)、科目 (subject)、收支账单录入 (invoice)、转账 (transfer) 和统计 (statistic) 功能,模块基于 Drupal 7.x,欢迎大家下载试用 :D

View Article

Android检查服务器连接状态

最近在写 Android App,需要在启动时就检查服务器连接状态,当服务器连接失败(如服务器关机、网络无连接等情况)时,弹出提示框,并强行退出程序,其中使用到 java.net.InetAddress 来检查主机状况。

View Article

Sphinx xmlpipe2 MVA 属性定义

今天给 Damdon 做 Search Engine,用的是  sphinx 0.9.9 全文检索引擎,由于某些 Content 包含多个分类 (Category),因此需要使用 sphinx 的 MVA (multi-valued-attribute) 属性类型,我使用了 xmlpipe2 数据源

View Article


Ubuntu Server 下编译 sphinx 的 xmlpipe2

在 Ubuntu Server 默认环境下编译安装 sphinx 竟然不支持 xmlpipe2 数据源,提示WARNING: source 'index1': xmlpipe2 support NOT compiled in. To use xmlpipe2, install missing XML libraries, reconfigure, and rebuild...

View Article

PHP 两个类方法和单实例实现

今天无意中发现两个平时很少用到的函数,做个笔记:is_subclass_of() - Checks if the object has this class as one of its parentsget_called_class() - the "Late Static Binding" class name首先 is_subclass_of,我以往在项目里面更常用操作符 instanceof...

View Article

Finance Module 1.1 for Drupal 7.x

上周给 Finance Module 做了下更新,主要是修复了一些错误并增加了一些统计图表,可以在账户列表中找到。下载地址: finance-7.x-1.1.zip

View Article


Finance Module 1.3 for Drupal 7.x

Finance Module 又发布更新了,这次增加了账户权重排序、科目权重排序以及理财计划和预算。账户权重排序主要是为了在多个用户使用时方便选择自己的账户,每个用户都可以设置自己的账户排序。理财计划可以设置每个月的计划收支,最后可以在预算报表反映一段时间后的期末余额,设置了计划收支后,录入了新账单后,会有一个提示你这个月该科目的收支情况哦~~~

View Article


今天终于把500G挂上。。。

今天终于把 1and1 上面的 500G 分区挂在上了,激动啊。。。

View Article
Browsing latest articles
Browse All 10 View Live




Latest Images