2015.1 Knowledge points and functions used when writing a message board, 2015.1 Message Board_PHP Tutorial

WBOY
Release: 2016-07-13 10:10:00
Original
715 people have browsed it

2015.1 Knowledge points and functions used when writing message boards, 2015.1 Message Board

1: Time function and uniqid()

 1: uniqid(): Generate a unique id. The length of the returned string without parameters is 13, and with parameters it is 23

 2: PHP function to convert time and timestamp to each other

 ①: time() returns the current unix timestamp microtime() returns the current unix timestamp and microseconds

 ②:date('Y-m-d H:i:s', time()) formats a local time/date

 ③:strtotime() Convert the date and time description of the English text of any date into a unix timestamp

2: Jump and redirection of tp framework

1: Page jump

 ①:success('prompt information', 'jump address', 'jump time'); Default jump address: $_SERVER['HTTP_REFERER'] Default waiting time: 1 second

 ②:error('prompt information', 'jump address', 'jump time'); Default jump address: javascript:history.back(-1) Default waiting time: 3 seconds

2: Page redirection

Redirect('URL address', 'time', 'prompt information') only wants to redirect a specified url address, not the operation method of a certain module. The usage is consistent with the U function.

 

 

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/939718.htmlTechArticle2015.1 Knowledge points and functions used when writing message boards, 2015.1 Message Board 1: Time function and uniqid() 1: uniqid(): Generate a unique id. The length of the returned string without parameters is 13. If there are parameters, it is...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!