Php and mysql server configurations
Zend_optimizer.optimization_level = 15
Zend_extension_ts = "d: phpendoptimizer. dll"
The zendoptimizer. dll path must comply
Find extension_dir and add the full name
Php checks whether the string is full of Chinese characters or contains Chinese characters.
$ Str = "'2014 Is ";
If (! Eregi ("[^ \ x80-\ xff]", "$ str ")){
Echo "all Chinese ";
} Else {
Echo "not
Phpsprintf function usage php floating point number format
Sprintf ("% 9.3f", 3.1415926); // right alignment: fill the number of digits with spaces. Result: "3.142"
Sprintf ("%-9.3f", 3.1415926); // left
Phpapc cache instance
ULTS ('admin _ username', 'apc '); // ADMIN USERNAME
ULTS ('admin _ password', 'password'); // admin password-change this to enable !!!
3. the apc example is very simple to use. See the
How to use php functions in smarty
/**
* Use php functions in the smarty template engine
* By bbs.it-home.org
*/
Require 'libs/Smarty. class. php ';
$ Smarty = new Smarty;
$ Smarty->
Sample code for connecting php to the oracle database
If ($ conn = OCILogon ("kai", "fjelite", "linux "))
{Echo "SUCCESS! Connected to database/n ";
}
Else
{Echo "Failed:-(cocould not connect to
PHP file upload is too large $ _ FILES is empty solution
In php programming, when the file to be uploaded is too large, $ _ files is displayed as null. For more information, see.This section solves the problem that $ _ FILES is empty
A small example of PHP determining whether to connect to the network
// Check whether the network is connected
Function varify_url ($ url ){
$ Check = @ fopen ($ url, "r ");
If ($ check ){
$
Example of phpcookie counter using cookie to create a counter
/**
* Cookie counter instance
* By bbs.it-home.org
* Date: 2013-9-29
*/
If (! Isset ($ _ COOKIE ['visits ']) $ _ COOKIE ['visits']
Php code for detecting image Trojans (multi-base programming)
This article shares a piece of code for detecting image Trojans implemented by php. it can be used to detect hexadecimal-encoded Trojans. For more information, see.This php
Php application development-file download details
This article introduces some code for downloading files using php. For more information, see.1. the php download function uses the header () and readfile () functions to download files.
Example of php multi-thread pipeline communication
This article introduces the example of multi-threaded pipeline communication in php. For more information, see.The code for multi-threaded php pipe communication is as follows:
Export
301 usage and error details
Options + FollowSymLinks
RewriteEngine on
RewriteCond % {HTTP_HOST} ^ domain.com [NC]
RewriteRule ^ (. *) $ http://www.domain.com/#1 [L, R = 301]
If you are using a Windows
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