The material takes deep into PHP and jquery development, and this book is actually about an activity calendar.
This article is suitable to go from other languages (such as Java,c++,python, etc.) to PHP, no system to learn PHP, or PHP beginners, has
Shuffle ()
The PHP shuffle () function randomly arranges the order of array cells (the array is scrambled). This function assigns a new key name to the cell in the array, which deletes the original key name and not just the reordering.
Grammar:
void header (String $string [, bool $replace = true [, int $http _response_code]]): Send a raw HTTP header
Here are several uses of header:
1, use header function to jump page;
Header (' Location: '. $url);
Where $url is the URL that will
The PHP parse_str () function parses the query string into a variable, mainly for passing values (parameters) between pages. This article to the Code Agriculture introduced PHP parse_str () function use method, interested in the code farmers can
This page class does not handle SQL;
Dramatically speeds up paging functionality
Http://blog.csdn.net/fkedwgwy
Xiaoxiang Blog--Xiaoxiang
/**
Demonstrate
Require_once ('.. /libs/classes/page.class.php ');
$page =new page (' Total ' =>1000, '
switch allows you to select multiple possible results for a scalar (expression).
Grammar:
Switch (expr) {case
result1:
statement1 break
;
Case RESULT2:
statement2 break
;
..... Default:
statement
The system
Some people think that Linux is very complex to build PHP environment, and then try to install LNMP one-click installation package. In fact, is to install a Web server, and then support PHP can be, very simple, compared to the installation of LNMP
To do the online Excel table editing function, Excel xls file format parsing is a problem, after all, this is the Microsoft Office private patent format.So to do it, use the universal CSV (Comma separated value, comma separated values) format.A
We tend to do a variety of optimizations on the server for caching settings, but we rarely notice
Client Cache, which is exactly the caching mechanism of the browser.
In fact, each browser has a caching policy, will temporarily cache each of the
php5.3 Self-belt PHP-FPM/usr/local/php/etc/php-fpm.confPID = Run/php-fpm.pidPID settings, default in the installation directory of the Var/run/php-fpm.pid, recommended to open
Error_log = Log/php-fpm.logError log, default Var/log/php-fpm.log in the
The infinite classification is a kind of data structure often used in the actual development, we call it the tree structure generally.
title: Similar to Taobao commodity classification, you can set its subclasses in any category.
First, create '
Copy Code code as follows:
Fix 404 Pages:
Header (' http/1.1 OK ');
Set 404 Header:
Header (' http/1.1 404 Not Found ');
Set moved Permanently header (Good for redrictions)
Use with location header
Header (' http/1.1 moved Permanently ');
1. Linked database Common method: conn.php
Copy Code code as follows:
First step: Link the database
$conn = @mysql_connect ("localhost:3306", "root", "root") or Die ("MySQL link failed");
Step Two: Select the specified database,
Nonsense not to speak more, directly on the code!
Copy Code code as follows:
Class Macaddr
{
Public $returnArray = Array ();
Public $macAddr;
function __contruct ($os _type=null) {
if (Is_null ($os _type)) $os _type = Php_os;
show.php Source code:
?
if ($action = = "CP") {
echo "
scrolling menu Data Input
Text One:
Link One:
Text Two:
Link two:
Text Three:
Link Three:
text Four:
Link Four:
Text Five:
Link Five:
"; exit;}
if ($action = = "Edit"
This example for you to share the PHP image upload class for your reference, the specific content as follows
Call Method:
get_ph_tmpname ($_files[' photo '] [' tmp_name ']);
$up->get_ph_type ($_files[' photo '] [' type ']);
$up->get_ph_size
This article is an example of how PHP implements automatic submission of forms based on fsockopen and curl. Share to everyone for your reference, specific as follows:
Fsockopen and curl All can do PHP automatic submission Form
1. Fsockopen Method:
This article illustrates a simple way to implement multiple language switching in PHP. Share to everyone for your reference, specific as follows:
1. Main program code:
$value) {if ($_session["language"] = = $value) {$selected = ' selected
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