php session_cache_limiter session_cache_expire等函数

session_cache_limiter() 返回当前缓存限制的名字. 如果指定了 cache_limiter, 当前的缓存限制的名字被改为新值.

缓存限制控制着 http 头发送到客户端的缓存控制. 这些确定页面内容规则的头内容可以被缓存.如果设置缓存设置为没有缓存(nocache), 将不允许任何客户端缓存. 但是公共变量可以允许缓存. 他也可以设置为私有的,这个比公共的多一点限制.

缓存显示在请求开始时被重新设置为 session_cache_limiter  的默认值.这样,你需要在每次请求时调用 session_cache_limiter() for every request (在 session_start() 调用前).

设置cache限制为 private

  1. */ 
  2. session_cache_limiter('private'); 
  3. $cache_limiter=session_cache_limiter(); 
  4. /*设置session的过期时间为30秒*/ 
  5. session_cache_expire(30); 
  6. $cache_expire=session_cache_expire(); 
  7. /*初始化session*/ 
  8. session_start(); 
  9. /*输出结果内容*/ 
  10. echo "当前的session cache限制被设置为:$cache_limiter<br />"
  11. echo "当前的session过期时间为:$cache_expire minutes"
  12. /* 
  13. 输出结果为: 
  14. the cache limiter is now set to private 
  15. the cached session pages expire after 30 minutes 
  16.  
  17. */ 
  18. //实例二 
  19. /*设置caceh限制者为'private'*/ 
  20. session_cache_limiter('private'); 
  21. /*返回caceh限制者*/ 
  22. $cache_limiter=session_cache_limiter(); 
  23. echo "当前的session cache限制被设置为:$cache_limiter<br />"
  24.  
  25. //实例三 
  26. $filename="test.mpeg"
  27. $filepath="test.mpeg"
  28. session_start(); 
  29. /*初始化session*/ 
  30. session_commit(); 
  31. /*输出请求的文件*/ 
  32. header("content-type: audio/x-mpeg");  //或者其他类型的文件 
  33. header("content-disposition:attachment;filename=".$filename); 
  34. header("content-length:".$filesize); 
  35. header("content-transfer-encoding:binarynn"); 
  36. header("pragma:no-cache");  
  37. header("expires:0");  
  38. $file_contents=file_get_contents($filepath);  
  39. print($file_contents 
  40. ); 

波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!

波比源码 » php session_cache_limiter session_cache_expire等函数

4,405 评论

  1. buy tadalafil without prescription internet cialis order viagra 50mg sale

  2. zyban 150 mg without prescription zyrtec generic oral seroquel 50mg

  3. naltrexone 50mg oral revia pill aripiprazole pill

  4. buy clomid online cheap ladbrokes uk online casinos for usa players

  5. purchase ozobax pill buy tizanidine toradol 10mg cost

  6. order sildenafil online viagra 150mg cialis mail order usa

  7. cefuroxime 250mg price cefuroxime ca methocarbamol cost

  8. essay writing sites cost stromectol buy ivermectin 3mg online

  9. free slots games otc ed pills tadalafil 5mg tablet

  10. order tretinoin cream sale tadalafil canada avanafil 200mg cheap

  11. online casino games for real money ladbrokes uk free spins no deposit us

  12. altace for sale arcoxia sale cost etoricoxib 60mg

  13. online assignment writer arava price sulfasalazine medication

  14. generic mesalamine 800mg buy avapro pills buy generic irbesartan

  15. order tricor without prescription us pharmacy viagra purchase viagra sale

  16. order metformin 1000mg sale buy tamoxifen 20mg buy tamoxifen 20mg for sale

  17. who can i pay to write my essay buy essays buy cheap essays

  18. generic doxycycline 200mg levitra 20mg usa where can i buy zovirax

  19. buy uroxatral 10mg pills diltiazem price purchase diltiazem generic

  20. Great post thank you. Hello Administ . Hacklink Panel Hacklink

  21. oxalato de escitalopram, clasificacion arancelaria lexapro sex escitalopram allergic reaction