Specific as follows:
1> as we know the start time, to add a time, to arrive at a result time, you can use the following code
$time 1 = ' 2008-10-1 12:30:30 ';
echo Date (' y-m-d h:i:s ', Strtotime ($time 1) +30*60);//Note the case in quotation
To sort multidimensional arrays, the common practice is to
1 Gets the sorted data and puts it into the array $arrsort. Where the key index is the index to sort the array, ensuring uniqueness
2 sort the $arrsort using sort function sort.
3 iterates
Can be resolved:
Set_time_limit (900);
This function specifies the maximum execution time for the current PHP script,
Although the set value is 900 seconds, actually
Maximum execution time max_execution_time value in =php.ini-the time the current
Copy CodeThe code is as follows:
Include ("adodb/adodb.inc.php"); Contains the ADODB class library file
Include ("adodb/adodb-pager.inc.php"); Contains the Adodb-pager class library file
$conn = newadoconnection (' mysql '); Create a ADODB object
The first approach:
Load the Encode module, if you need to install this module
Example code:
Copy CodeThe code is as follows:
$str =decode ("gb2312", $names [$index]);
@chars =split (//, $STR);
foreach (@chars)
{
$char =encode ("gb2312",
The premise is to be here: http://sourceforge.net/project/showfiles.php?group_id=42718&package_id=220409&release_id= 649609
Copy CodeThe code is as follows:
Include ("adodb/adodb.inc.php"); Contains the ADODB class library file
$conn =
Of course, in the program to solve the more flexible, such as:
"Select CONVERT (char, date field, +) as date2 from table"
The styles of the CONVERT (char,date,n) output
N Date Style
0 2 2005 9:06am
1 04/02/05
2 05.04.02
3 02/04/05
4 02.04.05
5 02
Copy CodeThe code is as follows:
Login
Copy CodeThe code is as follows:
@mysql_connect ("localhost", "root", "1981427")//Select the database before you need to connect to the database server
Or Die ("Database server
Copy CodeThe code is as follows:
if (Isset ($_cookie["username"))
{
Header ("location:main.php");
}
Else
{
echo "Cookie not found";
}
?>
Copy CodeThe code is as follows:
Setcookie ("username"); Delete Cookies
?>
http://www.bkjia.com/PHPjc/31988
1. Define constant define ("CONSTANT", "Hello World");
Constants can only contain scalar data (boolean,integer,float and string).
When calling a constant, simply use the name to get the value of the constant, not the "$" symbol, such as: Echo
Here's my idea of using the server's PHP environment configuration in the program, generating a license string, and then writing the string to the licensed file code. Even if the program is moved to another server, the program will not be able to
Copy CodeThe code is as follows:
function Yzm ($name, $width, $height) {
Header ("Content-type:image/png");
Srand (Double) microtime () *1000000);//sow a seed that generates random numbers to facilitate the use of random number generation
The code is as follows:
Copy CodeThe code is as follows:
#include
#include
#include
#include
#include
int main (int argc,char * argv[])
{
uid_t Uid,euid;
Char cmd[1024]= "Chmod-r 777";
Recently, when you make a site, you need to generate static pages, but some of the generated static pages need to be dynamically obtained, how can not be generated every day it?
Finally on the Internet to check a bit, plus a to summarize, ah ....
Copy CodeThe code is as follows:
intercepts the string length. Supports Utf-8 and gb2312 encoding. If it is gb2312, first turn it into Utf-8, intercept it on the basis of utf-8 and then convert it back.
function cut_string ($str, $from =1, $length =1
1. Prevent jumping out of the web directory
First modify the httpd.conf, if you only allow your PHP script to operate in the Web directory, you can also modify the httpd.conf file limit php operation path. For example, if your web directory
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