Use php to obtain the timestamp of today, tomorrow, and yesterdayEcho "Today:". date ("Y-m-d"). " ";Echo "yesterday:". date ("Y-m-d", strtotime ("-1 day"), " ";Echo "Tomorrow:". date ("Y-m-d", strtotime ("+ 1 day"). " ";Echo "one week later:". date (
Array_multisort usageI. first look at the simplest situation. There are two Arrays:$ Arr1 = array (1, 9, 5 );$ Arr2 = array (6, 2, 4 );Array_multisort ($ arr1, $ arr2 );Print_r ($ arr1); // The order is, 9.Print_r ($ arr2); // The Order is 6, 4, 2.I
MemcachedThere isStatsCommand to view the status information of the Memcached service.The usage is as follows:First, enter the telnet host name and port number in the command line to connect to the memcached server. Then, enter the stats command to
If you input a query directly inserted into an SQL statement, the application will be vulnerable to SQL injection. For example:Copy codeThe Code is as follows:$ Unsafe_variable = $ _ POST ['user _ input'];Mysql_query ("insert into table (column)
What is Hessian?Hessian is an open-source remote communication protocol provided by caucho.The binary RPC protocol is used for HTTP transmission. The server does not need to open any firewall port.The protocol specification is public and can be used
Use PHP to calculate the year, month, week, and number of days between two dates:Copy codeThe Code is as follows:Function format ($ a, $ B ){// Check the size of two dates. The default value is "first small" and "later". If the former value is
PHP BasicsI. First knowledge of PHPPHP is an embedded language mixed with HTML.1. PHP tagDefault tag Short mark , You need to enable the short_open_tag option in php. ini. It is not recommended to enable the short tag and other tags.
2. keywords
We often optimize cache settings on servers, but we seldom notice thatClient CacheTo be precise, it is the browser cache mechanism.In fact, each browser has a cache policy, which temporarily caches each browsed file in a special folder. When you
Curl installation:Installation under windows: Modify the settings of the php. ini file and find php_curl.dll.// Cancel the comment extension = php_curl.dllInstall it in linux:Copy codeThe Code is as follows:# Wget http://curl.haxx.se/download/curl-7.
The basic syntax of the PHP function split () is array split (string $ pattern, string $ string [, int $ limit]). We will give you two examples to illustrate how to use this function.For beginners, understanding the usage of common functions in PHP
The Code is as follows:Copy codeThe Code is as follows:/*[Discuz!] (C) 2001-2009 Comsenz Inc.This is NOT a freeware, use is subject to license terms$ Id: security. inc. php 16688 06: 41: 07Z cnteacher $*/// If IN_DISCUZ is not set, an access error
I tried to use memcache before. Later I found that memcached supports the setMulti method and is ready to switch to the memcached library.
(I tried it. In fact, memcache supports multi-value set, but it does not exist in the document. It seems that
View)
"View" mainly refers to the final result we send to the Web browser ?? For example,HTML. When it comes to views, many people think of templates,TemplateThe correctness of the scheme called view is questionable.
The most important thing for a
One of the most important new features of PHP 5.3 released recently is the addition of namespaces. This article introduces some terms, parsing rules, and application of some advanced functions of PHP namespaces, hoping to help readers use namespaces
1. Download the installerApache can be downloaded from http://www.apache.org/dyn/closer.cgi/httpd/binaries/win32/PHP can be downloaded from http://www.php.net.Ii. Installer1. Apache installation is relatively simple. We have a Windows installation
Php contains the zlib Link Library, which can be used directly. The following is an example of my compressed and compressed swf files:// If the swf file is not compressed, the first byte of the file is 'f' or 'C '.Compress the swf file:// Configure /
A simple decryption is written for eval. This principle is very useful. Write it down here.Copy codeThe Code is as follows:/*Author: zhiwushanData: 20080411*/ // Encrypted File Content$ A ="Eval (gzinflate (str_rot13 (base64_decode ('signature +
$ _ SERVER ['php _ SELF '] # File Name of the script being executed, which is related to document root.$ _ SERVER ['argv'] # parameters passed to the script.$ _ SERVER ['argc '] # contains the number of command line parameters passed to the Program (
Error Type:I. Binary upload is not usedCode:Fatal error: This encoded file is already upted. Please refer to http://www.zend.com/support/support_faq.php? Id = loader_file_corrupt for further help in/Webhome/*****. com/web/www/index. php on line 02.
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