Php 404 error page implementation code

Copy codeThe Code is as follows:# Set $ domain to your domain name (note that there is no www)$ Domain = "jb51.net ";# Set the URL. Note that there is no Dash/$ Docroot = "http://jb51.net ";# Set the font of the error message$ Fontface = "Verdana ";#

PHP color text implementation code

The following is a simple implementation method for the recent pop-up:1. Simple implementation of Color Words Copy codeThe Code is as follows:Header ("content-type: image/png ");$ Text = $ _ get ['T'];$ Font = 'stxingka. ttf'; // ttf font$ Fontsize =

PHP file size limit

Configure the php. ini file (for example, upload a file smaller than MB)Search for the following options and modify them.File_uploads = On; enable the File Upload OptionUpload_max_filesize = 500 M; Maximum number of uploaded filesIf you want to

Php Forum collection program simulated login, capture page implementation code

Copy codeThe Code is as follows:// Wu yanjun// 2009-06-27// Collection program phpSet_time_limit (0 );// Cookie storage directory$ Cookie_jar = '/tmp/cookie. tmp ';/* Function compute ------------------------------------------------------------------

Php strlen mb_strlen calculates the length of a mix of Chinese and English strings

Comparison between strlen and mb_strlenWhen all the characters are English characters, the two are the same. Here we will mainly compare the two calculation results when mixing Chinese and English. (The encoding method is UTF8 during testing)Copy

Php adodb connects to mssql to solve the garbled Problem

Zhou haihan/WenADO can use statements such as new COM ("ADODB. Connection", NULL, CP_UTF8) // 65001 to achieve correct conversion. However, ADO's support for php lacks documentation. There is an open-source adodb with rich documentation.For

Mysql performance check and Optimization Methods

1. The index is not created;2. SQL statements are too complex;3. Configuration Error;4. The machine cannot be loaded;1. Index not createdIf you see that mysql consumes a lot of cpu, you can use the mysql client tool to

PHP SQLite class

Copy codeThe Code is as follows:/*** SQLite class* 2009-5-6* Lian Wanchun**/Class SQLite {// Current SQL commandPublic $ _ mQueryStr = '';// Current resultPublic $ _ mResult = null;// SQLite connection handleProtected $ _ mSqlite;// Warning

Php unlimited SelectTree class

Copy codeThe Code is as follows:/*Author: nickDate: 2009.05.17Function: generate a SeletTree.Attribute:$ Result set$ Id_field id field$ Parent_field parent class id field$ Option_text option display name$ Select_name: name of the drop-down menu$

Php xml file operation implementation code (2)

Copy codeThe Code is as follows:// Create a new DOM document$ Dom = new DomDocument ();// Create a departs tag on the Root Node$ Departs = $ dom-> createElement ('demopart ');$ Dom-> appendChild ($ departs );// Create a depart subtag under the

Three installation methods for PHP memcache Extension

For more information, see http://code.google.com/p/memcached/wiki/phpclientcomparison. We recommend that you use the new memcached. The installation method is basically the same as below. You only need to install libmemcached first. If you need to

Apache2.2.4 + mysql5.0.77 + php5.2.8 simplified Installation

1. install ApacheCopy httpd-2.2.4.tar.gz to the/usr/local/src directory.Tar-zxvf httpd-2.2.4.tar.gzCd httpd-2.2.4. /Configure -- prefix =/usr/local/apache2 -- enable-so -- enable-vhost-alias -- enable-rewrite -- enable-deflate -- enable-mods-shared =

Php dynamic addition record

Copy codeThe Code is as follows: Insert a new data record No.: User name: password: Copy codeThe Code is as follows:@ Mysql_connect ("localhost", "root", "1981427") // You must connect to the database server before selecting a database.Or

Php cookie logon verification sample code

Copy codeThe Code is as follows: Login User name: password: Cookie retention time: browser Process Save for 1 day Save for 30 days 365 days Copy codeThe Code is as follows:@ Mysql_connect ("localhost", "root", "1981427") // You

Replace php session classes with mysql memory tables

Copy codeThe Code is as follows:/**@ Usage: use some other storage method (mysql or memcache) instead of php sessoin@ Author: lein@ Version: 1.0*/Session_start ();If (! Isset ($ _ SESSION ['test']) {$ _ SESSION ['test'] = "123_lein _". date ("Y-m-d

PHP database tree traversal Method

The Code is as follows:Copy codeThe Code is as follows:Session_start ();Define ('P _ s', PATH_SEPARATOR );Define ('root ',"./");Set_include_path (ROOT. P_S. 'zend'. P_S. ROOT. get_include_path ());// Load the ZEND frameworkRequire_once ROOT.

Summary of prereserved variables of php smarty

The following are examples of access page request variables such as get, post, cookies, server, enviroment, and session variables. for example, {$ smarty. server. SERVER_NAME} gets the server variable, {$ smarty. env. PATH} obtains the path of the

Php webpage Content Retrieval Method Summary

The captured content is filtered by using a regular expression to get the content you want. As for how to use a regular expression to filter the content, I will not introduce it here. If you are interested, the following are several common methods

PHP garbled code and Sessions verification solution!

When reading Chinese or other language characters in a PHP script is garbled, first check whether your file format is saved in UTF8 encoding format. If not, use UltraEdit... and other tools that support UTF8 conversion,It is best not to use the MS

Php IP address and IP address segment access restriction code

192.168.1.1 Single IP Address192.168.1. * proxy 192.168.1.1-192.168.1-255192.158.1.2-20 represents 192.158.1.2-192.158.1.20You can also write 192.168.1. [1 | 2 | 3]Hey hey ~ I don't know whether the idea is comprehensive in one method. I will

Total Pages: 12780 1 .... 10199 10200 10201 10202 10203 .... 12780 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.