PHP :: 如何优化 PHP

Posted on 30th June 2004 by Nio in 程序人生

原文地址:A HOWTO on Optimizing PHP
PHP is a very fast programming language, but there is more to optimizing PHP than just speed of code execution.

In this chapter, we explain why optimizing PHP involves many factors which are not code related, and why tuning PHP requires an understanding of how PHP performs in relation to all the other subsystems on your server, and then identifying bottlenecks caused by these subsystems and fixing them. We also cover how to tune and optimize your PHP scripts so they run even faster.

懒!

Posted on 29th June 2004 by Nio in 日常生活

由于忙于欧洲杯,搞得整个人很颓废的样子,白天上班也无精打采,盯着显示器里头的代码发呆。另外,最近惊奇地发现自己真得很懒。经常有些不错的东东想要写下来,但最后总是会进入到 CS 中,然后安慰自己说,CS 和写东西本质上都是一样的--都是在键盘和鼠标上进行手指的锻炼。还曾经想过写一些有意义的程序,最终都是放弃了,还有答应了帮几个朋友做 project,到现在也没帮上什么忙。唉~真懒,没有激情,整天白日做梦。祈祷明天我能够勤快起来吧。

Lucene 全文检索实践(4)

Posted on 23rd June 2004 by Nio in Lucene, 程序人生

在几天的研究中,了解了 Lucene 全文检索的一些原理,同时进行了实践,编写了一个论坛的全文检索创建索引程序及用于搜索的 JSP 程序,另外还写了一个 PHP 手册(简体中文)的全文检索,可以进行多关键字搜索。基本完成了最初定下的实践任务。

Tomcat Service 脚本

Posted on 23rd June 2004 by Nio in 程序人生

在 Linux (我用的是 Redhat)中,如果经常需要启动/关闭 Tomcat 的话,还是创建一个 daemon 来得比较方便,创建步骤如下:

(more…)

Smarty 2.6.3 Released!

Posted on 21st June 2004 by Nio in 程序人生

Change Log:
- added escapement of '</' to '<\/' in escape:javascript
modifier (c960657, Monte)
- added obfuscation of protocol-string in {mailto} when using hex-
encoding (bharat, messju)
- enhanced auto-generated filenames for templates_c and cache (messju)
- add 'nonstd' to escape modifier for escaping non-std chars,
such as ms doc quote (Monte)
- adjusted textformat to not output wrap chars after last para
(Monte)
- use tempnam() instead of unqid() to create better temporary files in
smarty_core_write_file() (xces, messju)
- add 'mail' to escape modifier for safe display of e-mail
addresses (Monte)
- add cycle function attribute "reset" to english docs (Monte)
- enhanced support of numeric constants as variable-expressions (messju)
- add case decentity to smarty_modifier_escape() (Konstantin A. Pelepelin,
messju)
- make smarty_core_write_compiled_include() php5-aware (messju)
- removed unused functionality to load a subset of lines from a file (messju)
- fix is_secure() should only check if a file is_readable, not if
the directory where it is in is readable (sagi, messju)
- fix problem displaying debug console when $default_resource_type
is not "file:" (c960657, Monte)
- fix permission handling with security and config_load (messju)
- removed '.' from the list of default template locations in
_parse_resource_name() (messju)
- fix avoid warning with template_exists() on an absolute paths (messju)
- fix parameters passed to resource's secure()-function (messju)
- fix handling of integer values like width and delay im
smarty_function_popup() (messju)