In PHP, the conditional control statement is the most used if else or switch statement, let me give you a detailed introduction I am in the study of PHP using if Else condition control statement notes need to refer to friends.
In the PHP language,
10 code Examples
/** @ (#) cngift.php 1.82 03/06/25** Sample documents written in Flowering stone* will be a simple demonstration of coding specifications**/
Require ("db.php");
/*** Demonstration Use Class** @version 1.82 03.06.25* @author Blossom
KeepAliveTimeout directive
Syntax:keepalivetimeout seconds
Default:keepalivetimeout 15
Context:server Config
Status:core
Compatibility:keepalivetimeout is only available in Apache 1.1 and later.
The number of seconds Apache would wait for a
These functions allow you to control the content of your script output. It can be used in many different situations, especially if your script has output information that requires a new file header to be sent. The output control function does not
This article to the students to collect some good PHP1 to 100 summation of various instances of the program, I hope to help you.
PHP1 to 100 summation method collection, there are many ways can be achieved, first of all, the simplest of several
III. handling of regular expressions
Let's talk a little bit about using ereg () and eregi () two functions to handle regular expressions. As I mentioned earlier, some of these functions are simple, some are complex, and are determined by your
This article simply uses an example to introduce a simple way to prevent SQL injection from PHP, there are friends who need to learn to refer to this article Oh.
Method One: The password comparison
Idea: First through the user input user name to
This article provides a detailed introduction to the global variables in PHP, and there are a few friends who need to know how to use the Globals function to refer to this article.
The scope of a variable is the context in which it is defined (that
The operators we use in PHP include arithmetic operators, assignment operators, comparison operators, logical operators, and so on. Let me introduce you to your friends.
Arithmetic operators
The division operator always returns a floating-point
When using PHP programming, I have a habit, do not like to use ready-made library files, such as Phplib or other similar libraries, in this system, I also intend to write a library file, it needs to process authentication, confirm email, update
/*
*lock_thisfile: Get exclusive lock
* @param $tmpFileStr used as the file name of the shared lock file (can be a name randomly)
* @param $locktype lock type, the default is False (non-blocking, that is, once the lock fails to return false directly)
PHP Tutorial Jump function and get the URL address of the current page
function Url_this () {
$url = "http://". $_server ["Http_host"].$_server["Request_uri"];
$return _url = "$url";
return $return _url;
}
Jump functionfunction Url_redirect ($url,
To ensure the effectiveness and integrity of the operation, the concurrency state can be converted to a serial state through a lock mechanism. As one of the locking mechanisms, PHP file locks are also designed to cope with resource competition.
In PHP, if you want to determine the browser type operation method is very simple, we just take advantage of the global variable http_user_agent can get the user browser information, so we can use the regular to determine the type or browser version.
Now there are several ways to jump out of the loop in PHP, one is to use goto another is to use the new PHP features goto command Oh, let me introduce the introduction.
Break is used in the various loops and switch statements mentioned above. His
Let's look at some of the usage and basic details of the date () function in PHP, as you can see here.
Date function usage
The code is as follows
Copy Code
Date ($t);
The format is as follows:
Format displayed:
How the exception works:
Try
{
Code processing program;
if (Code handling error) throw new Exception (' throws an exception ');//Use the Throw keyword, followed by an object of Exception
It is necessary to note that the PHP5 exception does not
PHP programmers are most prone to make 10 mistakes (GO)
PHP is a great web development language, flexible language, but see the PHP programmers repeating a number of mistakes. I made the following list, listing the 10 errors that PHP programmers
Apache Configure multiple virtual hosts with one IP
Namevirtualhost 192.100.100.1
ServerAdmin njzadmin@sina.com
Documentroot/wwwroot
ServerName www.a.com
Errorlog Logs/a.com-error_log
Customlog Logs/a-access_log Common
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