analysis on the operating mechanism of ApacheL
b/S Interactive processThe process of interaction between the browser and the server is shown in figure:
1. The browser (Browser) makes an HTTP request to the server (WEB server) (request). 2, the
1, connecting to the database
$dbhost = localhost;$dbuser = root; Your MySQL username$dbpass = 123456; your MySQL password.$dbname = data; The name of your MySQL library
Connecting to a local database$GLOBALS ["conn"] = mysql_connect ($dbhost,
For example, from two tables to isolate the millions data, now need to assemble the data together and then inserted into another table, in addition to the use of array assembly, what can be handled, if the use of the array of words how to ensure
Go from: http://hi.baidu.com/zdfgng/item/329b421a0de13c1de3f98653 php memchche usage on Windows
Memcache Related Introduction http://edu.codepub.com/2009/0614/6129.phpMemcache is a high-performance distributed memory object caching system that can
You have a CSV file with a 500多万条 record on hand and you need to import the database.
First MySQL table is the default InnoDB engine, the table has only one ID primary key, import to about 100,000 time, slow to 3-5/per second, so this certainly not.
>> This article link address: PHP Configuration session related knowledge
PHP Session has a GC function, is garbage Collector. When this GC starts, it clears the session that has timed out. Its working principle:
1. Users visit and log on to the
Example:
1, this is the content of conn.php:
? Php$conn = mysql_connect (' localhost ', ', ', ');mysql_select_db (' php ');?>
2. If so called:
function Fun ($a){Include ("conn.php");....//Database Processing statements}.....Fun ("AAA"); The first
Zend Studio loads an existing PHP project
I got a PHP project a few days ago. intend to study under. After a long day of tossing and turning it into the zend inside. Write a blog here for a rainy event. The following is an operational process.
Based on the results of these two articles tested in PHP 5.3.10 + CI3 Environment
http://zhangxugg-163-com.iteye.com/blog/1835721
http://my.oschina.net/zxu/blog/163135
DB Encoding
DB connection Encoding
DB Query Encoding
Universal Caching Technology
Data caching: Here is the data cache refers to the database query PHP caching mechanism, each visit to the page, will first detect the corresponding cache data exists, if it does not exist, connect the database, get the
Background: The project uses a rich text editor, the finished content is stored in the database, but when taken out because some of the display places do not need style, just want to get content, so need to have HTML encoded information to parse out.
How to connect three kinds of databases in PHP
mysqli
$mysqli = new Mysqli ("example.com", "User", "password", "database");
$result = $mysqli->query ("Select" Hello, dear MySQL user! ') As _message from DUAL ");
$row = $result->fetch_assoc ();
Echo
operating database in PHP
Basic process:1, connect the database:
$mylink = mysql_connect ("localhost", ' root ', ' 123 ');
2, set the connection code (usually UTF8)
Mysql_set_charset ("UTF8"); can also be used: mysql_query ("Set names
To do with a hidden field:
Submit page Code:
"/>
Target page (background processing page) code:
if ($_session[' SUB ']==$_post[' Sub_rand ']) {echo ' '; break; else{$_session[' SUB ']=$_post[' Sub_rand '];}
After testing, the
One, I understand the Ajax
Ajax is a new technology in recent years, mainly using JavaScript technology to implement the user data implicit submission, and allow the program to synchronize or asynchronous processing of data sent by the server.
The eval difference in PHP in eval and javascript:
Definition and UsageDefinitions and Usage
The eval () function evaluates a string as PHP code.The eval () function returns a string that corresponds to the PHP code.
The string must is valid the PHP
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