This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<handlers> | |
<clear /> | |
<add name="php-7.1.11" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="D:\Program Files\php\php-7.1.11\php-cgi.exe" resourceType="Either" requireAccess="Script" /> | |
<add name="ISAPI-dll" path="*.dll" verb="*" modules="IsapiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" /> | |
<add name="ExtensionlessUrl-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> | |
<add name="AXD-ISAPI-4.0_32bit" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function uuid($prefix = '') | |
{ | |
$chars = md5(uniqid(mt_rand(), true)); | |
$uuid = substr($chars,0,8) . '-'; | |
$uuid .= substr($chars,8,4) . '-'; | |
$uuid .= substr($chars,12,4) . '-'; | |
$uuid .= substr($chars,16,4) . '-'; | |
$uuid .= substr($chars,20,12); | |
return $prefix . $uuid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style type="text/css"> | |
@media screen and (max-width:359px) and (min-width:320px) { | |
html,body{ | |
font-size: 8px !important; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.panel{ | |
height: 48vmin; | |
width: 50%; | |
margin-top: 0px; | |
margin-bottom: 0px; | |
border-radius:0px; | |
color: #ffffff; | |
position: relative; | |
border: none; | |
overflow:hidden; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
step=2 #间隔的秒数,不能大于60 | |
for (( i = 0; i < 60; i=(i+step) )); do | |
/usr/bin/curl 'http:/xxx.com/api/hello' | |
sleep $step | |
done | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 16进制转换 | |
* @param string $hex | |
* @return string 返回值 | |
*/ | |
function hexToStr($hex) { | |
$string = ""; | |
for ($i = 0; $i < strlen($hex) - 1; $i+=3) { | |
$string.=chr(hexdec($hex[$i] . $hex[$i + 1])); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 用二维数组的某个元素做key | |
*/ | |
function replace_array_key( $data, $field, $append = [] ) | |
{ | |
$result = []; | |
foreach ( (array)$data as $key => $val ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 数组转换对象 | |
* | |
* @param $e 数组 | |
* @return object|void | |
*/ | |
function arrayToObject($e) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* https://www.eertime.com/archives/85.html | |
* [asyncExecute PHP异步执行任务] | |
* @param string $url 执行任务的url地址 | |
* @param array $post_data 需要post提交的数据POST | |
* @param array $cookie cookie数据用于登录等的设置 | |
* @return boole | |
*/ | |
function asyncExecute($url, $post_data = array(), $cookie = array()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set("session.save_handler", "memcache"); | |
ini_set("session.save_path", "tcp://192.168.48.128:11211"); | |
session_start(); | |
if ( ! isset( $_SESSION['TEST'] ) ) | |
{ | |
$_SESSION['TEST'] = time(); | |
} |
OlderNewer