惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V2EX - 技术
V2EX - 技术
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
S
Securelist
P
Privacy & Cybersecurity Law Blog
Scott Helme
Scott Helme
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
L
LINUX DO - 热门话题
Cyberwarzone
Cyberwarzone
Cisco Talos Blog
Cisco Talos Blog
量子位
博客园 - Franky
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Latest news
Latest news
T
Troy Hunt's Blog
N
News | PayPal Newsroom
Google Online Security Blog
Google Online Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
N
Netflix TechBlog - Medium
小众软件
小众软件
P
Palo Alto Networks Blog
Spread Privacy
Spread Privacy
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
L
Lohrmann on Cybersecurity
L
LINUX DO - 最新话题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Last Watchdog
The Last Watchdog
S
Security @ Cisco Blogs
P
Privacy International News Feed
Last Week in AI
Last Week in AI
Microsoft Security Blog
Microsoft Security Blog
T
Tailwind CSS Blog
博客园_首页
云风的 BLOG
云风的 BLOG
V
Vulnerabilities – Threatpost
D
DataBreaches.Net
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
Engineering at Meta
Engineering at Meta
Forbes - Security
Forbes - Security
T
Tenable Blog

博客园 - 王国营的博客

asp.net Handler中的IsReusable属性及在Handler中使用Session 关于Asp.Net中避免用户连续多次点击按钮,重复提交表单的处理 一道面试题 多层循环的递归实现 约瑟夫环问题 不通过第三个变量实现两个整型变量的交换 PHP Warning: date(): It is not safe to rely on the system's timezone settings EcShop 如何制作一张windows sp3启动安装盘iso? win7下xp mode IP在同一网段实现网络共享 sql server 2005附加数据库错误 无法打开物理文件 解决114啦源码(114la)不能生成地方房产和地方报刊问题4级页面0字节 菜鸟学PHP之Smarty入门(组图) 弹出一次“设为主页”和“加入收藏”代码 EMS SQL Manager中文显示乱码的解决方法 未在本地计算机上注册“Microsoft.Jet.OLEDB.4.0”提供程序 CSS和JS链接地址中带的问号是做什么的 IIS7/IIS7.5下轻松配置PHP利器(微软PHP Manager for IIS 7) iframe异步加载技术及性能 新开网址导航网站,欢迎各位朋友捧场
将PHP文件生成静态文件源码
王国营的博客 · 2012-06-10 · via 博客园 - 王国营的博客

开心返利网   5i321网址导航

将PHP文件转换成静态文件,这样就不用频繁读取数据库了,打开速度也会快很多

<?php
    function mhtml($url,$fileName){
      $Content=file_get_contents($url);
      $fp = @fopen($fileName, "w+");
      @fwrite($fp, $Content);
      fclose($fp);
    }
 mhtml("http://yourdomain/index.php","index.htm");
 echo ("生成成功");
?>