This article source code download address: Http://xiazai.jb51.net/201007/yuanma/TraceLWord.rar
Development environment for Eclipse (PDT)
Let's focus on the middle service layer. Intermediate service layer code is relatively simple, just call the
Basic Factory class
Copy CodeThe code is as follows:
Class myobject{
Object will be returned from the factory
}
Class myfactory{
public static function factory () {
return new MyObject ():
}
}
$instance =myfactory::factory ();
Parsing an image
1. How to create a PHP installation program
In fact, the installation principle of the PHP program is nothing more than to import the database structure and content into the corresponding database, from the process to reconfigure the database
The plug-in method of the reflection API is implemented based on the functionality of the program at run time, that is, it allows for the creation of an optional interface method and detects this part of the interface method on first use, which is
1 Setting up a database, registry
Copy CodeThe code is as follows:
Create Database Db_register;
CREATE TABLE Db_register.tb_register (
Reg_loginid varchar (primary key),
Reg_name varchar () NOT NULL,
reg_id int NOT NULL,
Reg_password varchar ()
Remember this function:
Function Name: Ignore_user_abort
Whether the PHP program continues to execute after this function has been configured or if the use End connection is interrupted. The default value stops when the connection is interrupted.
Copy CodeThe code is as follows:
/*
A function that determines whether a string exists
*/
function strexists ($haystack, $needle) {
Return! (Strpos ($haystack, $needle) = = = FALSE);//Note the "= = =" Here
}
/*
Test
*/
$mystring = ' abc ';
$findme =
Alter TABLE table1 ALTER COLUMN [name] varchar () NULL;
Table1 Table Name
Name field name why add [], because name is the SQL keyword will conflict error, so just in case.
If the name field has already created an index, you must delete the index
1. In the case of file_get_contents instead of file, fopen, feof, Fgets and other series of methods, try to use file_get_contents, because he is much more efficient! But pay attention to file_get_ Contents PHP version problem when opening a URL file;
Method file
Session implementation file: memcachedsession.php
Implementation principle (also the implementation principle of PHP internal session):
1. First determine if the client has SessionID,
A. Do not add a SessionID to the client, usually a 32-
Give the Select form a single name.
Submit the form after submission in $_post or $_get mode
$_post[' sel '] or $_get[' sel ') gets the value of the selected select
Copy the Code code as follows:
if ($_post)
{
echo $_post[' select '];
}
?>
1. Download xdebug binary file: http://www.xdebug.org/download.php
5.2 Http://www.xdebug.org/files/php_xdebug-2.1.0-5.2-vc6.dll
5.3 Http://www.xdebug.org/files/php_xdebug-2.1.0-5.3-vc6.dll
2. Find PHP.ini
3. If you have configured Zendoptimizer, you
Copy CodeThe code is as follows:
/*—————————————————— */
– Get list data for an unlimited assortment
/*—————————————————— */
function Get_sort ($parent _id=0, $n =-1)
{
Global $db;
static $sort _list = Array ();
$sql = "SELECT * from". $db->table ('
Upimages.class.php PHP Upload Class
Copy CodeThe code is as follows:
Class Upimages {
var $annexFolder = "Upload";//Attachment storage point, default: Annex
var $smallFolder = "small";//thumbnail storage path, note: Must be placed under the
1, download MYSQL5.1.48 source code, cmake,vs2008
2, install CMake and VS2008, decompression MYSQL5.1.48 to D:\mysql
3. Open CMD;CD D:\mysql
4. Run the command in cmd: WScript win\configure.js with_innobase_storage_engine
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