|
PHP -
Tutorial (教程)
|
描述
现在国内很多网站用的是 GB2312 格式的编码, 有的用的还是 GBK 或BIG5. 用这种编码格式的结果是有些浏览器不支持这种编码从而导致乱码出现 (我想这不是任何一个网站想要的), 或者是在不少时候要进行编码格式转换. 因此笔者建议在所有可能的地方都用UTF-8格式作为所有编码格式. |
|
查看全文...
|
|
|
PHP -
Basics
|
|
First let me give you an explanation of what I want to do. As you have noticed, most blogger sites or content management systems (CMS) allow users to input hypertext content. In such systems, one of the filters is a filter which handles the user input string. Here I don't want to talk about the security tricks. What I will show you is about the HTML matches in the user input. |
|
查看全文...
|
|
PHP -
Articles & Reviews
|
|
国内一谈到用基于LAMP平台的PHP开发, 就会有人质疑PHP的速度、效率等问题。因为他们用的都是微软的产品:操作系统、办公软件、服务器、开发平台。微软已经成了他们生活中离不开的部分。一旦失去它,他们就感到茫然无措。或许基于某种盲目的“自豪“感,觉得微软一切都是最好的了。 其实,这个世界远比微软美妙得多。微软的开发平台、服务器,业内人士如果有些了解的话,到底占多大比例,就不会再去恭维了 ... |
|
查看全文...
|
|
OS -
Applications (应用)
|
Doug McIlroy 是认为 UNIX 的哲学是:- Write programs that do one thing and do it well. 只做一件事,做好一件事
- Write programs to work together. 让程序协同工作
- Write programs to handle text streams, because that is a universal interface. 用文本数据流做为传输方式
UNIX 程序员会比别的程序员在任何时候都更注重强调着这三条哲学。 |
|
查看全文...
|
|
数据库 -
Configuration
|
|
The table used in this case is a user subscription table. Generally this table keeps records of users' subscription details: which topic they subscribed, when they last viewed their topics subscribed, who last replied a topic and when, when a default subscription will be expired (not used currently). Formerly we wanted to use multiple tables. That is, store user $uid's information in table mysubs_$t ($t = $uid%8). After some consideration of the problems may be brought in the future, I decided to use one table. |
|
查看全文...
|
|
PHP -
Basics
|
|
Windows 下配置 PHP 开发环境是比较典型的。配置与使用都比较方便。本文讲述的是在 Windows 环境下,Apache 2.2, PHP 5.2 和 MySQL 5.0 (也称WAMP) 的常用配置。总的来说,基本安装顺序为: Apache, PHP, MySQL。实际使用中,MySQL的安装与否、安装的话安装顺序,都是独立于 Apache 与 PHP 的。因为你并不一定用 MySQL,也有可能用 MSSQL,Oracle,等等。 |
|
查看全文...
|
|
数据库 -
SQL
|
|
This article gives out a relative fastest way to get the number of records from a huge table, which means, the table has millions, or even hundreds of millions, of records. In such huge tables, each possible optimization method is worth considering. Sometimes, evan one single optimized SQL sentence can save you a lot of time, especially in busy websites. Here, the example I will use to take the test is an Innodb, not MyISAM, engined table, which has five indices and 'id' as the primary key, with more than twenty million records. |
|
查看全文...
|
|
PHP -
Advanced Programming
|
|
The article generally talks about what is design pattern, when to use them and, why to use them. You could hear what are others' opinions... |
|
查看全文...
|
|
OS -
vim
|
|
Vim, an improved version of the vi editor, is one of the most popular text editors for Unix and Linux systems. It's highly configurable to enable efficient text editing. And, you know, it's free. It may be a little difficult for newcomers, but for experienced user, it shows its productivity. To make your text editing more efficient, I made a collection of those vim tips. |
|
查看全文...
|
|
Web服务器 -
cgi
|
|
通用网关接口 (CGI) 定义了一种使 Web 服务器与外部内容生成程序相交互的一种方式。该方式常被称为 CGI 程序或 CGI 脚本。这种方式是最简单且非常常用的向网站中添加动态内容的方式。本文向您简单介绍了如何在 Apache 服务器上配置 CGI 并开始编写 CGI 程序。 (适用绝大多数 Apache 服务器: 1.3,2.0,2.2) |
|
查看全文...
|
|
PHP -
Basics
|
1. 保持PHP版本最新。 2. 不显示网站的错误信息和潜在的可能泄漏信息,把display_errors = 设成off。 3. ini 选项设置: force_redirect 设为 on allow_url_fopen off allow_url_include off display_errors off expose_php off group_id 100 magic_quotes_gpc off memory_limit 8388608 post_max_size 262144 user_id 100
|
|
查看全文...
|
|
OS -
Applications (应用)
|
Searching on Linux can be incredibly complex, especially when you ask a regular expression for help. By the time they're done helping you, you feel inferior and too lowly to be worthy of Linux. While being able to search for a particular instance of the word "how," you can actually do quite a lot with the three basic Linux searching utilities: locate, find, and grep. Locate and find search for files, and grep searches for text in files.
|
|
查看全文...
|
|
|
|
|
|
|
Page 7 of 9 |