php
七刀
爱编程,爱学习,爱分享……
现在关注我的以后可都是老粉了……
展开
-
php实现当前月份的前12个月(输出近一年的月份)
获取当前月份近12个月//获取近12个月 function monthlater(){ $str = array(); for($i=0;$i<12;$i++){ $str[$i] =date('Y-m',strtotime('-'.$i.'month')); } return $str; }结果为:Array( [0] => 2020-10 [1] =>原创 2020-10-28 15:45:15 · 1912 阅读 · 1 评论 -
PHP-通过word模板生成word
1.安装Composerhttps://www.runoob.com/w3cnote/composer-install-and-usage.html2.安装phpwordcmd命令行:composer require phpoffice/phpword3.测试使用原创 2020-09-08 10:09:41 · 1211 阅读 · 1 评论 -
php获取http和https网页源代码
一:获取http网页源代码: 函数:file_get_contents() 源代码如下:<?phpheader("Content-Type: text/html;charset=utf-8");$url = 'http://www.dilidili.wang/';$str = file_get_contents($url);//获取网页,此时输出$...原创 2018-12-13 11:53:39 · 5375 阅读 · 0 评论