Strange problems caused by "reference" in the PHP loop
This article Is based on an article on the stackoverflow website: Strange behaviour after loop by reference-Is this a PHP bug? -- In the PHP loop, if you useReferenceIt will lead to
A set of typical php tutorials from the family (Li Yanhui php second season)
Course CatalogChapter 2 Object-oriented basics* C) i6 N % C7 ^-d + M5 d ,~137. object-oriented basics (1) & B * X-B5 m4 J "p0 k7138. object-oriented basics (2 )#?)
Save the array as a file
Save the array as a file-it is generally used in user read/write configuration items to save the configuration fileThis script must have write permission and read and execute permission to generate the target
ID card verification code calculation
It turns out that the last X of my ID is actually 2.
Public function id_verify ($ my_id ){
$ Coefficient = array (, 2 );
$ Remainder_map = array (, 'X', 9, 8, 5, 4, 3, 2 )
Design Mode (adapter)
Personal Understanding: The adapter serves as the medium between the original function and the new function. that is to say, the new function must call some of the original functions. This improves code reusability.
Basic principles of phpsocket | server. php | client. php
Basic principles of php socket:Server: Create a socket = bind the socket to the specified IP address and port = listen to all connection requests of the socket = respond or return
Set up a resource search engine using php + sphinx
Background:Most download links of resources on the donkey are closed, and some good resources cannot be downloaded, which is a pity. It was found that some small resource websites can
PHP code exception
This morning I encountered a big BUG. when the student ID card number on the school platform was too long, when I compared it, I found it was the same!I wrote a simple example.Paste it up and ask the experts to answer why!
Batch modify content
Batch modify file content $ dir path $ research modified content $ replace modified content
Function find_all_dir ($ dir, $ research = array (), $ replace = array ()){
// Find all the files in the
Long article pagination
Long article pagination
Error_reporting (E_ALL ^ E_NOTICE );
If ($ _ GET ['Page'] = "") {$ _ GET ['Page'] = 1 ;}; // determines whether the variable value is null.
?>
A simple generic paging class written by a user
Simple paging class written by php for personal learning, with strong versatility
/**
* Simple paging class
* @ Author: phpprince
* @ QQ: 8923052.
* @ Date:
An upgraded version of array_column, the record set processing function.
Nice: Simplified operation, batch processing of array_walk, reference, and low internal consumption.Application scenario: mainly used to process record sets
ZF framework Database Tracker usage
Used in learning job Zend_Db// Call the tracker method$ Profiler = $ Db-> getProfiler ();
/*
How to use a tracker
*/
// Introduce the Loader class (automatic loading
PHPmemcache ring queue
PHP memcache ring queue class. Beginner, I have never learned the data structure. because of the business needs, I just tried it hard! The original form is the PHP memcache queue code shared by lusi on oschina. To
CURL does not use file access cookies
CURL does not use COOKIEJAR or COOKIEFILE to access cookies.
/* ----- Save COOKIE -----*/
$ Url = 'www .xxx.com '; // url
$ Post = "id = user & pwd = 123456"; // POST data
$
Monday of the current day
Monday of the current day
Private function mondayTime ($ timestamp = 0, $ is_return_timestamp = true ){
Static $ cache;
$ Id = $ timestamp. $ is_return_timestamp;
If (! Isset ($ cache [
Elegant verification code
Import the font by yourself. you can modify the font as needed.We recommend that you use bold fonts.
Class Imagecode {
Private $ width;
Private $ height;
Private $ counts;
Automate computation-give it to your son for computation o (cost _ efficiency) o
Custom range, custom operator, and number of custom operations. Awesome
/**
* Description of QuestionEngine
* Question engine
Download word directly from database query
Function save ($ word_name)
{
Echo"";
$ Data = ob_get_contents ();
Ob_end_clean ();
$ This-> wirtefile ($ word_name, $ data );
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