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 | |
$url = 'http://baidu.com'; | |
$headers = get_headers('http://mp.weixinbridge.com/mp/wapredirect?&action=appmsg_redirect&uin=&biz=MzUxMTMxODc2MQ==&mid=100000007&idx=1&type=1&scene=0&url=' . $url, 1); | |
if ($headers['Location'] !== $url) { | |
echo '域名被封'; | |
} else { | |
echo '域名正常'; | |
} |
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 base64EncodeImage($image_file) | |
{ | |
$base64_image = ''; | |
$image_info = getimagesize($image_file); | |
$image_data = fread(fopen($image_file, 'r'), filesize($image_file)); | |
//$base64_image = 'data:' . $image_info['mime'] . ';base64,' . chunk_split(base64_encode($image_data)); | |
$base64_image = 'data:' . $image_info['mime'] . ';base64,' . base64_encode($image_data); | |
return $base64_image; |
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
function character(s){ | |
var memt = 16; | |
s=s.replace(/\-/g,''); | |
var len=s.length; | |
var z=Math.ceil(len/4); | |
var zz=parseInt(memt)+parseInt(z)-1; | |
document.getElementById("sn").setAttribute("maxlength",zz); | |
var ss=''; | |
for (var i = 0; i < z; i++) { | |
ss+=s.substr(4*i,4); |
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 float $seconds | |
* | |
* @return string | |
*/ | |
function secondsToHms($seconds) | |
{ |
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 | |
// 简单版本 | |
$filename = 'LoveMe.wav'; | |
$wavdataoffset = 44; | |
$wavdataend = filesize($filename); | |
$fp = fopen($filename, 'rb'); | |
$fseek = fseek($fp, 28); | |
$bitrate = unpack('V', fread($fp, 4)); | |
$bitrate = $bitrate[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 | |
header("Content-type: text/html; charset=utf-8"); | |
set_time_limit ( 0 ); | |
if (isset ( $_GET ['dir'] )) { // 设置文件目录 | |
$basedir = $_GET ['dir']; | |
} else { | |
$basedir = '.'; | |
} | |
$auto = 1; | |
checkdir ( $basedir ); |
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 | |
/** | |
* 保存配置到php文件中 | |
* @param string $filename 文件路径 | |
* @param mixed $content 保存的内容 | |
*/ | |
function saveConfig($filename, $content) | |
{ | |
file_put_contents($filename, "<?php\n\nreturn " . var_export($content, true) . ';'); |
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
<Configuration> | |
<Add OfficeClientEdition="64" Channel="PerpetualVL2019" AllowCdnFallback="True" OfficeMgmtCOM="True"> | |
<Product ID="ProPlus2019Volume"> | |
<Language ID="zh-cn" /> | |
<ExcludeApp ID="Access" /> | |
<ExcludeApp ID="Groove" /> | |
<ExcludeApp ID="Lync" /> | |
<ExcludeApp ID="OneDrive" /> | |
<ExcludeApp ID="OneNote" /> | |
<ExcludeApp ID="Outlook" /> |
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 | |
# 发送微信通知 | |
# 企业ID https://work.weixin.qq.com/api/doc/90000/90135/90665#corpid | |
CORPID=填写企业ID | |
# 应用的凭证密钥 https://work.weixin.qq.com/api/doc/90000/90135/90665#secret | |
CORPSECRET=填写应用的凭证密钥 | |
# 企业应用的id ,整型。企业内部开发,可在应用的设置页面查看 | |
AGENTID=填写企业应用的id | |
# 获取token的接口地址 https://work.weixin.qq.com/api/doc/90000/90135/91039 |
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
{ | |
"theme": "light", | |
"snippet": { | |
"expanded": true, | |
"newSnippetPrivate": false, | |
"sorting": "updated_at", | |
"sortingReverse": true | |
}, | |
"editor" : { | |
"tabSize": 4, |