SQLite Tutorial in PHP
SQLite Tutorial in PHP
SQLite is an SQL database manager used locally or on a website, and compatible
in particularly with PHP.
Summary
Installing SQLite and creating a database
.
Installing SQLite. Verifying the installation by creating a base.
Creating and using a SQLite table
.
Creating a table. Deleting a table. Adding a record. Reading a record.
How to find and update a post
.
Filling a database. Dump of the whole base. Finding a record by ID. Searching a post. Updating a post.
Download
The complete source code of the scripts
in a ZIP archive.
More
SQLite and multi-users. How to treat concurrency issue with SQLite
.
相关文档:
1、安装libeven
memcached的使用需要libeven的支持,我们得先装上libeven。
官方网站:http://www.monkey.org/~provos/libevent/
libevent安装方式比较简单:
./configure && make
make install
检查是否 已经安装
ls -l /usr/local/lib/ | grep even
2、安装memcached
官方网站:http://ww ......
平时用 htmlspecialchars() 来过滤html, 但是把html的字符转义了,最后显示出来的就是html源代码, 利用strip_tags()就可以把html标签去除掉.
[php]
$str = 'harryxu
‘;
echo(htmlspecialchars($str) . ‘
‘);
echo(strip_tags($str));
// output:
// harryxu
// harryxu
?>
......
PHP程序员的十个建议性技巧
2009-07-11 09:46
一个同样的功能,各种程序语言大多能实现.就算一种语言,也有很多种实现方法.各种方法各有各的好坏.
对于PHP
比较常见的几个程序使用问题.本文总结一些PHP程序员的十个建设与技巧,供大家参考.
1.使用 ip2long() 和 ......
PHP解疑
1. 代码重用方法include()和require()函数差异?
1) Require()函数
使用requier()包含外部php文件时,只要自身php文件被执行,外部文件的内容就将被包含进该自身php文件,当包含的外部文件发生错误时,系统将给出错误提示,并且停止php文件的执行。
示例:
调用文件config.inc的程序代码:
<?php ec ......
PHP的发展
PHP 原本的简称为 Personal Home Page,是Rasmus Lerdorf 为了要维护个人网页,而用c语言开发的一些CGI工具程序集,来取代原先使用的 Perl 程序。最初这些工具程序用来显示 Rasmus Lerdorf 的个人履历,以及统计网页流量。他将这些程序和一些表单直译器整合起来,称为 PHP ......