Function fun ()
{
Echo 'fun ';
}
$ A = 'fun ';
$ ();
?>
CopyCode
The above $ a variable is the fun () function. Calling $ A () is the same as calling fun.
You can also use another method.
Call functions in PHP:
Mixed call_
I use services_json FOR THE JSON class library of PHP. It has no special advantages or obvious disadvantages.
Create File data. php:
Include ("JSON. php ");
$ DATA = array (Array ('name' => mb_convert_encoding ('old Wang ', 'utf-8', 'gbk'), 'age' =>
The vprintf () function outputs formatted strings.
The number format is the conversion format, starting from the percent sign ("%") to the end of the conversion character. The following possible format values:
%-Percentage sign returned% B-binary
Recently, when reading a cool man's code, I saw a very useful function: extract (). Its main function is to expand the array and use the key name as the variable name, the element value is a variable value, which provides another convenient tool for
// The PHP time is calculated in seconds. The JS time is measured in milliseconds.
Date_default_timezone_set ('prc ');// Date_default_timezone_set ("Asia/hong_kong"); // Region
// Configure the daily activity period$ Starttimestr = "8:10:00 ";$
The detection data type is used to detect the data type and determine whether the detected data type belongs to the detection type. If yes, the system returns true. Otherwise, the system returns false. The detection data type is defined as follows:
Q. Why is Chinese content not displayed in the browser when the Apache server is used?
A. The new version of Apache (2.0.x or later) sets the default language of the server to the Western European language.
This situation. The solution is to modify
From http://www.php8848.com/wp/zh/942.html
If you access the PHP webpage in a browser and the page is not displayed, a window is displayed for downloading the PHP file because Apache is not configured and PHP is not known, follow these steps to
Compared with explode (), the strtok () function can control the pace. Cut strings as needed. Its advantages are:
1. multiple separators can be defined at a time. When a function is executed, it is cut by a single separator rather than the entire
PHPThere are many reasons to become the world's most popular scripting language: flexibility, ease of use, and so on. However, encoding in PHP or other languages is monotonous and repetitive. At this time, a PHP framework is required to replace the
Tomcat running PHP
XML Code
In the tomcat installation directory, comment out the following code in CONF/Web. xml.
CGI
Org. Apache. Catalina. servlets. cgiservlet
Debug
0
Cgipathprefix
name = $ name; $ this-> age = $ age; echo "My name is {$ this-> name }, {$ this-> Age} years old this year. \ n ";} public function climb () {echo" I will climb the tree! \ n ";}/ * interface a flying interface provided by bird */interface ifly
Preface
My blog hasn't been updated for a long time. I recently read the blog of msra Niu, Liu weipeng (www.mindhacks.cn). I feel deeply touched and learned a lot about algorithm learning, thinking methods, career development, and so on, so after
Use session without Cookie
Solution to cross-page transfer failure of session in PHP
Friends who have used session in PHP may encounter such a problem. Session variables cannot be transferred across pages. This has plagued me for a few days and
Abstract The WAP header and tail functions of two discuz segments, which saves some trouble in writing WAP. By the way, repeat WML programming basics.
Function wapheader ($ title ){
Header ("Content-Type: text/vnd. WAP. WML; charset = UTF-8 ");
/*
I recently read a book and conducted a small test. The execution process of constructor and destructor is simple. If the same variable appears as an instance of different classes, in PHP, how can we construct and analyze the structure? After testing,
How to Use crontab regularlyUsage:
Crontab [-u user] filecrontab [-u user] {-L |-r |-e}
Note:
Crontab is used to allow users to run programs at a fixed time or interval. In other words, it is similar to the user's time table. -U user is used to set
Recently, I encountered a server with a Fedora Core 5.0 Linux operating system. The originally installed Apache 2.0 and PHP 5.1.2 do not support the GD library, the verification code images and statistical charts generated by the GD library on the
I am used to using wlw to write offline logs. If I cannot use it, I am not used to it.
Today, I applied for a trial space for host2ez, opened my own e-file SITE share with you, and used WordPress 2.7 en,
No matter how many users, they should
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