最新动态
  • news日志翻译系统开通
  • qq 本站QQ群:54245128(满)
  • zf qq ZF QQ群:25125789
  • zf msn ZF MSN群:group57479@xiaoi.com
用户登录
  用户:
  密码:
        注册 | 忘记密码
常用链接
本站Logo

 
Powered By
HappyCMS 0.4.0

Zend Framework 1.6.1

SiteMap | BBS Archives

站点链接
论坛新贴 最新精华
最新翻译Blog 更多»
   [wulijun01234] New    [wulijun01234] PHP5.3的新特性(一):对象接口的变 ...
   [wulijun01234] 如何创建更友好的随机密码 ...    [wulijun01234] PHP中构造GET查询字符串的捷径 ...
   [wulijun01234] PHPUnit 3.4中的新特性:Test Depend ...    [wulijun01234] 停止CSRF保护的误用
   [wulijun01234] 优化你的(ZF)web应用    [wulijun01234] 再论代码之美——PHP实战
   [wulijun01234] PHPro.org:应用配置    [wulijun01234] 用于解决PHP 命名空间分隔符输入问题 ...
   [wulijun01234] 书评:《php5 CMS 框架开发》 ...    [wulijun01234] DevShed:在php5中处理MySQL数据集错 ...
   [ringtail] 使用NTILE()方便地生成tag云图 ...    [ringtail] Zend Framework Q&A Session
   加入 | PHPEye翻译小组: mayongzhan (18) wulijun01234 (13) iwind (10) ringtail (9) haohappy (6) helloyou (2) littlexiang (0) jasonqi (0) wohugb (0) zvaly (0)
 

For some of our long-running processes we use PHP. It makes total sense from our perspective, because we can re-use all our existing business logic from our main PHP web application.

To make things more efficient, I recently started some work on using forks and have a couple of worker processes around.

This application is essentially the core of our transcoder. The parent process would retrieve new jobs from the queue and fire up a number of workers to actually transcode the file. The main problem is that the parent opens up a MySQL connection and fires off some queries. After the child process is done, it actually closes the MySQL connection regardless of if it was actually used or not.

This means I'll have to close all mysql connections before forking, and re-connecting right after. No big deal, but still at least a bit annoying.

<?php

$db 
......
2008-12-03 03:40:08 | 全文 | 评论(0)
 
  Robert Basic's Blog: MyUrl view helper for Zend Framework


Robert Basic has posted a view helper for the Zend Framework he's developed - one to more correctly handle URLs without dropping the query string information.



Zend Framework's built in URL view helper - Zend_View_Helper_Url - is discarding the query string of the URL, thus breaking some links.


The included helper for URL building formats the output in a slightly unexpected way, so his helper uses this format and, with the help of a few loops and some string appending, spits a "more correct" version out the other side. Complete code and a usage example are included.

2008-12-03 03:40:05 | 全文 | 评论(0)
 
  Laknath Semage's Blog: PHP + Large files


Laknath Semage submitted a new blog post he's written up about working with large file uploads in your PHP applications.



If we want to do large file uploads or database updates with PHP there are few configurations to be done to default settings and I'm putting this as a note to myself (I'm always keep forgetting this) as well as to any one who may find this useful like when importing a large backup file through phpMyAdmin.


There's four php.ini settings he recommends checking as well as two values to change if you do have the need to upload a large import file back into a phpMyAdmin installation (ExecTimeLimit, MemoryLimit).

2008-12-03 02:40:07 | 全文 | 评论(0)
 
  NETTUTS.com: Mimicking Apple's Address Book for the Web

The NETTUTS blog has this new tutorial posted (including a screencast) showing how to make a web application similar to the Address Book on Apple's OS X operating system.

As we all know, WordPress is so extensive that you can use it for nearly anything. There are even articles on sites with crazy titles such as 101 alternative uses for WordPress. So I thought, hey, why not? I bet a lot of people want to create their own Web Apps, and essentially WordPress can do that for you. In this video tutorial, we're going to make an online Address Book.

Building on a WordPress base and including jQuery and a Live Search Plugin, they create the multi-pane look and feel, styled largely with ......

2008-12-03 01:40:07 | 全文 | 评论(0)
 
  Martynas Jusevicius' Blog: Method overloading in PHP 5

Martynas Jusevicius has a new post looking at method overloading in PHP5 - a workaround to make it possible at least.

Method overloading (a feature of object-oriented programing which allows having several class methods with the same name but different signatures) is not implemented in PHP, which is a drawback compared to Java. However, PHP 5 provides a way to imitate overloading by catching calls to "inaccessible methods" with magic method __call.

In his example he uses __call to route the request to the correct version of the constructor (__construct0 or __construct1) based on the number of arguments passed in

2008-12-03 01:40:07 | 全文 | 评论(0)
 
回头来看 Beginning Linux Programming 的 shell 部分还是有不少收获,其中一个 dialog 的工具,就激发了我写个简单的选择 ip 的小脚本的想法: 把 ip 分类保存成文件,每个文件中的一行(unix 风格换行符)为一个 ip,然后把下面的脚本的 host_path 值修改成这些 ip 文件所在目录—该目录下不要有其他文件即可。
# list all the host files
host_path=/home/hick/hosts/
# compose the menu tag
menu_tag=''
for file in $(ls $host_path); do
menu_tag="$menu_tag $file $file"
done
# display the host files
dialog --title "QzoneCity host list" --menu "please select the type" 30 30 15 $menu_tag [...]
2008-12-03 00:40:11 | 全文 | 评论(0)
 
  DevShed: Authentication Scripts for a User Management Application


DevShed continues their series looking at user authentication in PHP applications with this third part of the nine part series. The focus is on the creation of the authentication scripts.



In this article we will continue to discuss the application-wide scripts that we started to talk about in the last article. These special scripts are used by all the scripts and pages of the application. We will continue to look at the func.inc script that has several useful functions defined in it.


Their func.inc script contains the helper functions the rest of the application can use (like isAdmin, isAuthd, genpass and checkEamil). They explain each of the the functions and include an example of them in action. The also include the other half of the pair - the logout script.

2008-12-03 00:40:03 | 全文 | 评论(0)
 
2008-12-02 23:40:06 | 全文 | 评论(0)