
php
hehexu_
这个作者很懒,什么都没留下…
展开
-
PHP 按照时区获取当前时间
PHP 按照时区获取当前时间/*** 时间格式化* @param string $dateformat 时间格式* @param int $timestamp 时间戳* @param int $timeoffset 时区偏差* @return string*/functionqgmdate($dateformat='Y-m-d H:i:s',$t...原创 2020-04-19 09:13:13 · 1247 阅读 · 1 评论 -
curl 实现json-rpc 服务
<?php 2 $ch = curl_init(); 3 $url = 'http://localhost/jsonrpc?tm='.time().mt_rand (100,999); //参数是为了防止缓存 4 $options = array( 5 CURLOPT_URL => $url, 6 CURLOPT_USERAGENT => "Mozi...原创 2019-10-14 09:40:11 · 1505 阅读 · 0 评论 -
php://input http请求
/** * 获取HTTP请求原文 * @return string */ function get_http_raw() { $raw = ''; // (1) 请求行 $raw .= $_SERVER['REQUEST_METHOD'].' '.$_SERVER['REQUEST_URI'].' '.$_SE...原创 2019-10-13 15:42:54 · 309 阅读 · 0 评论 -
php://filter
1. php://filter文件包含漏洞:https://blog.youkuaiyun.com/fageweiketang/article/details/80699051筛选过滤应用:1、 字符串过滤器:string.rot13 对字符串执行ROT13转换string.toupper转换为大写string.tolower 转换为小写string.strip_tags去除html和p...原创 2019-10-13 10:52:44 · 202 阅读 · 0 评论 -
$http_response_header 超全局变量
<?phpfunctionget_contents(){file_get_contents("http://example.com");var_dump($http_response_header);}get_contents();var_dump($http_response_header);?> 结果array(9) { [0]=>...原创 2019-10-13 10:36:59 · 166 阅读 · 0 评论 -
PHP之static静态变量详解(一)
https://www.cnblogs.com/52php/p/5658171.html翻译 2019-08-07 09:33:16 · 181 阅读 · 0 评论 -
socket 编程
https://www.php.cn/php-weizijiaocheng-258864.htmlhttps://blog.youkuaiyun.com/qq_33344121/article/details/79968775转载 2019-08-20 16:53:46 · 110 阅读 · 0 评论 -
php pack unpack
PHP中有两个函数pack和unpack,很多PHPer在实际项目中从来没有使用过,甚至也不知道这两个方法是用来干嘛的。这篇文章来为大家介绍一下它俩到底是用来干啥的。packstring pack ( string $format [, mixed $args [, mixed $... ]] )该函数用来将对应的参数($args)打包成二进制字符串。其中第一个参数$format,...转载 2019-09-24 12:42:54 · 157 阅读 · 0 评论