Some questions about global and globals in PHP
First look at a simple example
$a = ' scnjl '; function test () {global $a; unset ($a);} Test (); Var_dump ($a); function test1 () {unset ($GLOBALS [' a ']);} Test1 (); Var_dump ($a);
? Here is the
(RPM) PHP steps for timed tasks
Ignore_user_abort (); PHP scripts can continue to execute even if the client disconnects (such as turning off the browser).
Set_time_limit (0); Execution time is unlimited, php default execution time is 30 seconds,
The regular removal of some div content.
I want to get rid of some div content. The div ID or class band comment or share (comment and share are a fuzzy match. ), for example,, and so on.
The following test code retains the main content. Remove the
Detailed code for thinkphp processing of massive data table mechanism
The thinkphp built-in sub-table algorithm is applied to process millions user data. Data sheet: house_member_0 house_member_1 house_member_2 house_member_3 model class
PHP four ways to invoke a remote URL
1. Get content with file_get_contents in get mode
Example:
2. Open the URL with fopen and get the content in Get mode
Example:
3, using the File_get_contents function, the Post method to obtain the URL
$
Original Fast Interchange of PHP strings and byte arrays
??????? To encrypt, you need to convert the string to an ASCII byte array. Conversely, you have to turn back. Why is the code fast? That is, can not use for the loop, directly without. Using
Fast and accurate UA recognition in PHP
Ua:user-agent This can be obtained in the server variables provided by PHP. What is the purpose of user-agent recognition?
1. What browser is it? This is no longer necessary. CSS hack can help you render
Java Code to PHP code, the master into
Import Java.util.arraylist;import Java.util.arrays;import Java.util.list;public class Arrayassemble {@ Suppresswarnings ("unchecked") public static void main (string[] args) {string[] Arrofint = {"Red",
PHP Null value __
PHP Null value judgment
When using PHP to write a page program, I often use the variable handler function to determine the PHP page trailing parameters of a variable value is empty, at the beginning I used to use the empty ()
PHP intercepts string problems
In programming, you often encounter the problem of segmentation a string based on a word.
In general, we use explode to divide a string into an array and then proceed further.
But if there is a need to intercept a
PHP Framework queryphp Tutorial: Getting Started six view templates
Use native PHP code tags?
Read the manual:?
PHP provides some alternative syntax for process control, including If,while,for,foreach and switch.
The basic form of an alternative
Add a discuz-like batch upload image to Phpcms
??? First give everyone a test URL, feel the effect, http://www.qdlspf.com/admin? Account password are aaaaaa, in the content management has a batch upload column, release information, in the Picture
Wrote a PHP random quiz verification Code, security personally think it is good.
wangking717 wrote
Security features One:
1. The generated content is not the final result, but a question-and-answer system that requires users to respond to the
Eclipse Install PHPEclipse Plugin
To download PHPEclipse this plugin first:
http://sourceforge.net/projects/phpeclipse/files/a%29%20Eclipse%203.3.x/PHPEclipse-1.2.3/ Phpeclipse-1.2.3.200910091456prd-bin.zip/download
After downloading and
Phpgacl Chinese Manual (11) usage
use in your application Phpgacl
Basic usage
This example shows you how to use it in your program Phpgacl basic usage of the. It uses the ADOdb Data Abstraction Layer and provides a simple way to ensure the
php-templates (Template) mode
1. Definition: A framework that defines an algorithm for an operation, deferring implementation of some steps to subclasses.
In fact, the idea is that the skeleton of the algorithm is not changed, that is, the first
Shanghai Grand PHP engineer Face test
Source: http://www.iteye.com/topic/833480
Yesterday to Shanghai Grand interview, apply for PHP engineer.
10 minutes early to the first floor of the hall, the gate and access to the door has 2 guards, as if a
PHP removes null values from the array
foreach ($arr as $k = + $v) { if (! $v) unset ($arr [$k]); }
Oh, it was so beautiful before.
When I was wandering around the internet, I was surprised to see people with Array_filter.
PHP Small record symbol function
Annotation symbols:
Single-line annotations
Multi-line annotations
Use of quotation marks
' Single quotation marks, without any meaning, are brought directly over by any treatment;
"" Double quotes, 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