We use a simple example today to illustrate the use of GetText in PHP (GetText is a series of tools and library functions that help programmers and translators develop multi-lingual software) to implement PHP i18n.
Now, let's say we want to show a
To illustrate:
In the Windows environment: Originally in the php4.3.0 running a normal program, in 4.3.1 why many error, the general tip is: notice:undefined varialbe: variable name.
For example, the following code:
Copy CodeThe code is as follows:
The purpose of jquery is write less, does more. Its development style of JavaScript is not as strong as Yui, of course, it is not as large as dojo and Yui. It greatly simplifies the daily development of JavaScript, primarily the manipulation of DOM
Let's start by describing a function that you write yourself.
Copy CodeThe code is as follows:
$IMGSRC = "Http://www.nowamagic.net/images/3.jpg";
$width = 780;
$height = 420;
Resizejpg ($IMGSRC, $IMGDST, $width, $height);
function Resizejpg
There are two ways to use foreach ():
Copy CodeThe code is as follows:
foreach (Array_Name as $value)
{
Statement
}
The array_name here is the name of the array you want to traverse, each time the value of the current element of the Array_Name
What is a semantic URL attack?
Curiosity is the main motive of many attackers, and semantic URL attacks are a good example. This type of attack mainly involves editing the URL to find something interesting.
For example, if a user Chris clicked on
1. Any number of arguments to the function
You probably know that PHP allows you to define a default parameter for a function. But you may not know that PHP also allows you to define a function of a completely arbitrary parameter
The following is
We just need to add the following code in the feedback.php to judge it.
Note: The following is just a PHP restricted IP instance code, if you intend to apply to the CMS, please modify it yourself, or if you are using DEDECMS, you can contact the
Copy CodeThe code is as follows:
$t 1 = Explode ("', Microtime ());
// ... Execute code ...
$t 2 = Explode ("', Microtime ());
Echo ($t 2[1]-$t 1[1]). ' S '. ($t 2[0]-$t 1[0]). ' Ms ';
In fact, a little bit of a try, you can find this code has a
Copy CodeThe code is as follows:
Ini_set ("Safe_mode", true);
?>
Table 42-2. Safe Mode restriction functions
Name of function
Limit
Dbmopen ()
Checks whether the file or directory being
Copy CodeThe code is as follows:
/**
* Viewer Mode
*
* Defines a one-to-many dependency between objects so that all objects that depend on it are notified and automatically refreshed when the state of an object changes
* Ability to conveniently
Copy CodeThe code is as follows:
Gets the directory name of the specified folder
function Get_dir_name ($dir _path, $file)
{
$dirpath = $dir _path;
$dir = Scandir ($dirpath);
foreach ($dir as $key = $value)
{
if (Is_dir ($dirpath. ' /'. $value) &&
First, connect the database1. Mysql_connect: Open MySQL Link
Mysql_connect (' host ', ' username ', ' password ')
2. mysql_select_db: Open a Database
mysql_select_db (' database name ', $ link identifier)//link identifier not filled by default is
what is CGI
The CGI name is a "public Gateway Interface" (Common Gateway Interface), a tool that the HTTP server "chats" with programs on your or other machines, and its programs must be run on a network server.
CGI can be written in any language,
In this article, I will introduce the two advanced concepts and usages in phpunit, although it may not necessarily be used in your daily unit tests, but it is important to understand and learn how to use them for learning phpunit.
The annotations
There are roughly three ways to categorize PHP indefinitely,
1, the database by setting the parent class ID to make a unique index, and then use the recursive invocation of the function to achieve infinite classification;
2, the database design is
1. Handling of arrays:
1.1 Creation and initialization of arrays:
The 1.arrary () function creates an array, by default the 0 element is the first element of the array,
Count () and sizeof () function to get the number of data elements
2. Creating
1. Iconv () Introduction
The Iconv function converts a well-known character set file to another known character set file. For example, convert from GB2312 to UTF-8.
The Iconv function is built into the PHP5 and the GB character set is turned on by
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