![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
php
PHP
hang499
这个作者很懒,什么都没留下…
展开
-
mac apache 重启
<!--停止服务:--> sudo apachectl -k stop <!--开启服务:--> sudo apachectl -k start <!--重启服务:--> sudo apachectl -k restart原创 2022-03-16 14:18:10 · 655 阅读 · 0 评论 -
.htaccess 添加跳转https 非www跳转www
RewriteEngine onRewriteCond %{HTTP_HOST} ^demo.com$RewriteRule ^(.*)$ "https\:\/\/www\.demo\.com\/$1" [R=301,L]RewriteCond %{SERVER_PORT} !^443$RewriteRule ^(.*)$ "https\:\/\/www\.demo\.com\/$1" [R=301,L]原创 2021-12-03 11:13:35 · 1856 阅读 · 0 评论 -
PHP Access-Control-Allow-Origin设置多个域名
//废话不多说,复制就完了$origin = isset($_SERVER['HTTP_ORIGIN'])? $_SERVER['HTTP_ORIGIN'] : '';$allowOrigin = array( 'https://www.apeaksoft.com', 'https://imypass.apeaksoft.com');if (in_array($origin, $allowOrigin)) { header("Access-Control-Allow-Origin:".$ori原创 2020-12-17 18:17:53 · 1103 阅读 · 0 评论 -
php时间戳转换为js时间
function to_date(phpstr) { str = parseInt(phpstr) * 1000; var newDate = new Date(str); var year = newDate.getUTCFullYear(); var month = newDate.getUTCMonth() + 1; var n...原创 2020-01-20 12:07:47 · 493 阅读 · 0 评论