This file contains hidden or 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 | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok) | |
Version: 0.1.7 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
This file contains hidden or 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
# Subscribe to my YouTube Channel -> https://lokjianming.page.link/CVLm # | |
# Blog -> https://jerrylokjianming.github.io/ # | |
How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (without license) ↓ | |
1. Download & Install Sublime Text 3.2.2 Build 3211 | |
2. Visit <https://hexed.it/> | |
3. Open file select sublime_text.exe | |
4. Offset 0x8545: Original 84 -> 85 | |
5. Offset 0x08FF19: Original 75 -> EB |
This file contains hidden or 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
// 获取微信或者支付宝里的网络类型 | |
if(!function_exists('getNetWorkStatus')){ | |
function getNetWorkStatus(){ | |
$agent = $_SERVER['HTTP_USER_AGENT']; | |
// $agent = 'Mozilla/5.0 (Linux; Android 7.0; MI 5 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043622 Safari/537.36 MicroMessenger/6.5.23.1180 NetType/WIFI Language/zh_CN'; | |
if (stripos($agent, 'MicroMessenger')!==false){ | |
$type = '微信'; | |
$start = stripos($agent, 'NetType/'); | |
if(false !== $start){ | |
$end = stripos($agent, ' Language'); |
This file contains hidden or 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
if ($response instanceof Json || request()->type() == 'json') { | |
$response->header('Access-Control-Allow-Origin', '*') | |
->header('Access-Control-Allow-Methods', 'GET, POST, PATCH, PUT, DELETE') | |
->header('Access-Control-Allow-Headers', 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With'); | |
} |
This file contains hidden or 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
/** | |
* 抛出异常处理 | |
* @param string $msg 异常消息 | |
* @param integer $code 异常代码 默认为0 | |
* @return void | |
*/ | |
function E($msg, $code=0) { | |
$msg = iconv('GB2312', 'UTF-8', $msg); | |
throw new Think\Exception($msg, $code); | |
} |
This file contains hidden or 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
$var = sprintf('%04d', 2);//生成4位数,不足前面补0 | |
echo $var;//结果为0002 |
This file contains hidden or 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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<!-- localStorage --> | |
<script type="text/javascript" src="js/localstorage.js"> | |
</script> | |
<script> | |
window.onerror = function(msg, url, line) |
This file contains hidden or 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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-menu-button/core-menu-button.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../paper-icon-button/paper-icon-button.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> |
This file contains hidden or 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
//120 to 两小时0分 | |
function (min) { | |
return (min/60>>0)+'小时'+(min%60)+'分钟'; | |
}; |
This file contains hidden or 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 str_repeat(len, str){ | |
return new Array(len).join(str); | |
} |
NewerOlder