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
<?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
<?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 | |
// 简单版本 | |
$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 | |
/** | |
* 秒数时长转时分秒显示 | |
* @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
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 | |
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
<?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
// 判断刘海屏 | |
function hasNotch() { | |
var proceed = false | |
var div = document.createElement('div') | |
if (CSS.supports('padding-bottom: env(safe-area-inset-bottom)')) { | |
div.style.paddingBottom = 'env(safe-area-inset-bottom)' | |
proceed = true | |
} else if (CSS.supports('padding-bottom: constant(safe-area-inset-bottom)')) { | |
div.style.paddingBottom = 'constant(safe-area-inset-bottom)' | |
proceed = 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
function pages(arr, len) { | |
const pages = [] | |
arr.forEach((item, index) => { | |
const page = Math.floor(index / len) | |
if (!pages[page]) { | |
pages[page] = [] | |
} | |
pages[page].push(item) | |
}) | |
return pages |