哦买噶:What the hammer?

php ajax 跨域请求允许多个域名

2018-2-26 晦涩sunshine PHP学习笔记

php ajax 跨域请求允许多个域名 $origin = isset($_SERVER['HTTP_ORIGIN'])? $_SERVER['HTTP_ORIGIN'] : ''; $allow_origin = array( 'http://a.com', 'http://b.com' ); if(in_array($origin, $allow_origin)){ header('Access-Control-Allow-Origin:'.$origin); } header("Access-Control-All...

阅读全文>>

标签: php ajax 跨域

评论(0) 浏览(74)

PHP 获取指定时区当前时间-PHP获取世界时钟

2015-5-4 晦涩sunshine PHP学习笔记

        公司一个项目中需要展现几个不同时区的当前时间,由于php技术很菜,遂百度之,综合各种结果写了下边小函数。 <?php function world_time($timezone_identifiers)//获取指定时区当前时间 { date_default_timezone_set($timezone_identifiers); //设置默认时区为指定时区 echo date('H:i:s',time()); //输出指定时区当前时间 date_default_time...

阅读全文>>

标签: php php获取世界时钟 php获取指定时区时间

评论(2) 浏览(3426)

ecshop Deprecated: Assigning the return value of new by reference is deprecated in 报错解决方法

2014-4-14 晦涩sunshine PHP学习笔记

    今天本地测试ecshop,后台操作站点地图是报如下错误: Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\ecshop\admin\sitemap.php on line 46 Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\ecshop\admin\sitemap.php on li...

阅读全文>>

标签: php ecshop php5.3

评论(0) 浏览(8703)

1970年1月1日(00:00:00 GMT)Unix 时间戳(Unix Timestamp)

2013-11-4 晦涩sunshine PHP学习笔记

今天在看Python   API时,看到time模块:

The epoch is the point where the time starts. On January 1st of that year, at 0 hours,the “time since the epoch” is zero. For Unix, the epoch is 1970. To find out wha...

阅读全文>>

标签: timesstamp php

评论(1) 浏览(16930)

Powered by emlog sitemap