When session sessions are turned on, a cookie that uniquely identifies session_id to the browser (named Phpsessid can be obtained via Session_name () is sent first, with Session.save_handler = Files, a file with no suffix is generated under the
The first method:
Copy CodeThe code is as follows:
/**
* Directory Generation class: Utilsmakedir
* @author Yepeng
* @since 2010.3.18
*/
Class utilsmakedir{
The directory is not established when the base directory is created. This should be a
Scheduled Tasks
Copy CodeThe code is as follows:
Ignore_user_abort (); User Close Browser program still executes
Set_time_limit (0); No limit on program run time
$interval = 3; Program Cycle time interval seconds
$link = mysql_connect (' localhost
Support text watermark, image watermark
Support for watermark location random or fixed (ix Gongge)
Watermark Transparency Settings (both image watermark and text watermark support)
font, color, and size settings for text watermarks
Background
PHP extension mbstring is not found, and you now seem to be using multibyte character sets. PhpMyAdmin that do not have a mbstring extension do not correctly split the string, which can produce unexpected results.
Unable to load MCrypt workaround
The main function is file_get_contents, the main program is divided into two paragraphs, with me to see it (the Human blog Original code, reproduced please specify).
Copy CodeThe code is as follows:
function Escape ($STR) {
Preg_match_all ('/[\x80-\
Mind Map Click, you can see the big picture.
Introduction
I write down the places I like and pay more attention to and share them with you. Last time I wrote a "PHP with the boss of the dialogue." Still have a lot of questions, this book helped me
PHP 5 authoritative programming (PHP 5 Power programming) PDF download Address http://www.jb51.net/books/28207.html
In PHP4, without using __construct () as the name of the constructor, a method must be defined using the name of the class, as in C +
Ceil-into one method to take the wholeDescription
float ceil (float value)
Returns the next integer not less than value, in which value is entered if there is a fractional part. The type returned by Ceil () is still float, because the range of float
File handling functions
1. File operation.Open File:
The corresponding object is returned when the specified file is opened, and may be created automatically if the specified file does not exist.
Resource fopen (string filename,string mode [, int
1. Code optimizationCode optimization is not just about writing clean and clear code, but simplifying the code. You can use Zend Optimizer to help you do these tedious tasks. Zend Optimizer can be obtained free of charge from Zend Technologies's
Send a simple example first
Copy CodeThe code is as follows:
if (!is_dir (' txt '))//Determine if TXT is a folder directory
{
mkdir (' txt ');//Create a folder directory named txt
$open =fopen (' txt/in.txt ', ' w+ ');//Open file in read-write
Comparison operators for Erlang
opdescription== equals/= not equal to =
= greater than or equal to > Greater than =:= exact equals =/= exact difference of equal to and exact equal:
If you want to compare two numbers, if the two numbers are
Click here to download the source file
Copy CodeThe code is as follows:
function Pinyin ($_string, $_code= ' gb2312 ')
{
$_datakey = "A|ai|an|ang|ao|ba|bai|ban|bang|bao|bei|ben|beng|bi|bian|biao|bie|bin|bing|bo|bu|ca|cai|can|cang|cao |ce|ceng|cha ".
Environment: PHP 5.2.14 CentOS 5.5
First step: Build an extended skeleton
CD Php-5.2.14/ext
./ext_skel–extname=laiwenhui
Step Two: Modify the compilation parameters
CD Php-5.2.14/ext/laiwenhui
VI CONFIG.M4
Remove
Php_arg_enable (Laiwenhui,
Summarize:
Using PHP to download the file needs to give four headers (), you can refer to my other blog post: How PHP implementation of the download function ultra-detailed process analysis
Calculate the size of the file, do not need to open the
The first occurrence of a strstr-lookup string
String Strstr (String $haystack, mixed $needle [, bool $before _needle = false])
Note 1: $haystack is a string of characters, $needle is the string being looked up. The function is case-sensitive.
Note
Very basic things, feel code is not concise, I hope the Master Guide to modify
Copy CodeThe code is as follows:
function Bubblesort ($STR) {
for ($i =0; $i
For ($k =count ($STR)-2; $k >= $i; $k-) {//Bubbles the value forward;
if ($str [$k
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