Prevent the PHPWIND Forum from being maliciously registered by the registration machine for advertising. Recently, my forum has a registration machine that maliciously registers and publishes advertisement information, which is annoying. I am trying
PHPWIND background anti-automatic registration machine verification code is added to phpwind background to prevent PHPWIND Forum from being maliciously registered and advertised by registrars. Recently, my forum has been maliciously registered with
PHP controls the webpage expiration time code, read the PHP code that controls the webpage expiration time, and sometimes we need to control the webpage expiration time such as the homepage. For example, if we use Chinacache CDN, how should we
Header ("location:http://bbs.it-home.org";);
Exit After each redirect, "Exit" must be added to avoid an error and continue execution.
?>
Header ("refresh:3;url=http://bbs.it-home.org");
Print (' Loading, please
PHP provides a variety of functions for getting time and date. apart from getting the current UNIX timestamp using the time () function and getting the current time using the date function, you can also call the getdate () function to determine the
PHP class for sending emails
Class emailui
{
Static function runlog ($ mode = 'smtp ', $ B = '', $ c ='', $ d = ''){
}
Static function sendmail ($ toemail, $ subject, $ message, $ from = '', $ cfg =
This article mainly introduces the security method for PHP to output an English time and date. The time and date mentioned in this article is in RFC1123 format, and summarizes a gmdate function not affected by setlocale, for more information, see
Date and time in PHP. PHP has many easy-to-use functions to display and process dates. To display a date or time in a specific format, you can use the date () function. It has two parameters: how to display the date format in PHP there are many easy-
Php merge js request example, look at the code directly. Let's take a look at the code. for example, php merges js requests.
The code is as follows:
// Save the page as js. php
// Front-end request example http: // localhost/js. php? F = 1, 2
The result returned is 401 sign error
Public Function Delete ($path) {//For example http://www.xx.com/a/b.jpg, I pass the deletion is/a/b.jpg//Delete part skip//flush cache start $ch = curl_i NIT (' http://purge.upyun.com/purge/'); $date =
Of course, you must first enable the reload_assist_ims on Function in CDN. in this way, no-cache is not used. this will convert no-cache to if-modified-since. so we write
ProgramIt is better to control if-modified-since. note: In the cache system
We can use the header to control the HTML page using the META tag and PHP program. For example:
The code is as follows
Header (' cache-control:max-age=86400, Must-revalidate ');//24 hours
Header (' last-modified: '. Gmdate (' d, D M Y h:i:s '). '
Browser cache, it is completely not the case, the cache content is stored in the browser local, and the content is generated by the Web server, neither party can complete the system process independently, so there must be a communication mechanism
Date () is a commonly used date-time function, let me summarize the date () function of the various forms of usage, there is a need to learn the friend can refer to.
Formatted dateThe first parameter of the date () function specifies how the date/
php datetime function date ()
1, year-month-day
echo Date (' y-m-j ');
2007-02-6
echo Date (' y-n-j ');
07-2-6
Uppercase Y represents the year four digits, while lowercase y represents the two digits of the year;
Lowercase m represents the number
Core code:
Copy CodeThe code is as follows:
Header ("Expires:mon, Jul 1997 05:00:00 GMT");
Header ("last-modified:". Gmdate ("D, D M Y h:i:s"). " GMT ");
Header ("Cache-control:no-cache, must-revalidate");
Header ("Pramga:no-cache");
This is
The system library file used for downloading THinkPHP1.5 files in THinkPHP is Http. class. php, located in the ThinkPHP \ Lib \ ORG \ Net directory, class name Http, where there is a static method staticfunction THinkPHP file download
The system
PHP datetime function Date ()
1, year-month-day
echo Date (' y-m-j ');
2007-02-6
echo Date (' y-n-j ');
07-2-6
Uppercase Y represents the year four digits, while lowercase y represents the two digits of the year;
Lowercase m represents the
All are made with DIV+CSS, call the direct read database, fast, automatic generation of static HTML pages. Color can be controlled by CSS, bring up the color with your forum to match! You can also make your favorite style home page through the
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.