can refer to the http://blog.csdn.net/vipzjyno1/article/details/25248021, which is written about the notice is good, but also very comprehensive, my this article is mainly to record their adaptation on the problems encountered.The unified way to create notifications:Notificationcompat.builder Mbuilder = New Notificationcompat.builder (mcontext);The management of notifications is to use Notificationmanager to manage notifications, using the following: Initialize the system service to be used, and
($cachefile, ' w ');Fwrite ($FP, ob_get_contents ());Fclose ($FP);Ob_end_flush ();} Cache_start ($_time, $dir);Here is the output, placed between the Cache_start and Cache_end two methodsFor ($i =0 $i {echo $i;Sleep (1);}Cache_end ($dir);?>
Cases
Cache using generated files
The code is as follows
Copy Code
Ob_start ();/*** @author He Nihui* @copyright 2009-3-13* @param string $cache _folder Slow folder* @param
;
Example 2, here is an example to illustrate the PHP page caching technology, the following code:
Copy Code code as follows:
$_time = 10;
$dir = "D:\php\";
function Cache_start ($_time, $dir)
{
$cachefile = $dir. '/' SHA1 ($_server[' Request_uri '). HTML ';
$cachetime = $_time;
Ob_start ();
if (file_exists ($cachefile) (Time ()-filemtime ($cachefile) {
Include ($cachefile);
Ob_end_flush ();
Exit
}
}
function Cache_end ($dir)
{
$cachefile = $dir. '/' SHA1 ($_s
Contact Us
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.