Work sometimes encounter the need to be a directory of files in bulk processing operations, this time we need to find all the eligible files in the directory and save to a result set, and then convenient batch processing, usually to save it in an
With CodeIgniter also has a period of time, has not done what summary. Now summarize some of the CodeIgniter Operation database table optimization, although not all, but also really can help those who have just started CI students.
Link
Php/** Hash:: Zipper method to solve the problem of hash node storage conflict *:: 2014-07-02 *:: Small_kind*/classSmall_hash {Private $size= 20;//Hash Node Size Private $zone=NULL;//hash Space//instantiate the function and set an initial hash node
The previous blog is mainly string type, list type and set type, the following hash type and Zset type
1,hset
Description: Sets the value of the domain field in the hash table key to value. If the key does not exist, a new hash table is created and
Usually we use Htmlspecialchars () to filter the HTML, but the HTML characters escaped, the final display is the HTML source code.
You can use Strip_tags () to get rid of HTML tags.
$str = ' href ';echo Htmlspecialchars ($STR);echo
It is good to use Memcache to synchronize sessions, of course, you can also save the session via Redis, which allows PHP to open and store the session in the Redis cache. The following is a procedure for setting up a session with Memcache in a Web
Recently in the blog, but a variety of blog synchronization between the trouble, fortunately, each blog has its own RSS aggregation system, can be implemented through RSS blog call, so that their own hands-on RSS blog to achieve synchronization, in
one, 3 methods of array traversal introduction
1. foreach ()
foreach () is the simplest and most efficient way to iterate through the data in an array.
#example1:Copy the Code code as follows:$colors = Array (' Red ', ' blue ', ' green ', ' yellow '
One
IntroductionTemporary files, as the name implies, are temporary files, and the file has a short life cycle.
However, a lot of applications run without temporary files, temporary files on our computer everywhere, mainly in the following forms of
The CodeIgniter supports caching technology to achieve the fastest speed. Although CI is already quite efficient, the dynamic content in the Web page, the memory CPU of the host, and the speed of database reading directly affect the loading speed of
server environment, Centos6.5
1. Installing the memcached server
Yum-y Install memcached
2. Configure Memcached Server users and auto-start services, etc.
--level 2345 memcached on
3. Configure the configuration file
vi/etc/sysconfig/Memcachedport=
Definition and usage
The Filemtime () function returns the last modified time of the file's contents.
If successful, the time is returned in the form of a Unix timestamp. If it fails, it returns false.
Grammar
Filemtime
Recently heard that PHP5.4 is fast, so I want to build a local environment test. I'm going to install PHP5.4.8, Apache2.4.3, and Mysql5.5.28 with local Windows XP SP3.
First download the latest version of PHP, Apache, and MySQL.
PHP5.4.8 version
----------------------------------------------------------------------------------------------------
For example, the following login code:
if ($l = @mysql_connect (' localhost ', ' root ', ' 123 ')) or Die (' Database connection failed
A project that has been done in the last few days requires the ability to upload images in the WYSIWYG editor, and I chose it because I prefer the CKEditor interface. Although there is a good ckfinder with CKEditor, but this east of the function is
recently in the campus library book information collection procedures, since it is the collection of library books, there must be submitted search page, nothing but post submission, let me think of the curl simulation submission, first through
PHP Cryptographic decryption function sharing, one is discuz! authcode cryptographic function (with detailed decomposition), one is the Encrypt () function.
Need to use PHP to encrypt specific information, that is, through the encryption algorithm
Phpanalysis is currently widely used in Chinese parts of speech, using reverse matching pattern word segmentation, so compatible with a wider range of coding, now its variables and common functions are described below:
First, the more important
The general use of file-mode caching is sufficient, and thinkphp also provides a fast caching method, specifically for file mode, F method.
Because
using the PHP return method, so its efficiency is higher than the S method。
The F method has the
PHP Cross-site file upload
Existing a video site A, users can upload video.
b website want to call a site interface upload video, two sites are not the same server.
A uploadify plugin for a website. How to achieve cross-site upload?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service