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
#!/usr/bin/env bash | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin | |
export PATH | |
#================================================= | |
# System Required: CentOS/Debian/Ubuntu | |
# Description: HaProxy | |
# Version: 1.0.7 | |
# Author: Toyo | |
# Blog: https://doub.io/wlzy-19/ |
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/> | |
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> | |
<title>main</title> | |
<link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" /> | |
<link rel="stylesheet" type="text/css" href="../css/api.css" /> | |
<link rel="stylesheet" type="text/css" href="../css/common.css" /> |
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
http{ | |
... | |
limit_zone one $binary_remote_addr 10m; | |
... | |
server{ | |
listen 80; | |
.... | |
location/{ | |
limit_conn one 5; #限制连接数 | |
limit_rate 500k; # 限制速度 |
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
RewriteEngine on | |
RewriteBase /dokuwiki | |
RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L] | |
RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L] | |
RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L] | |
RewriteRule ^$ doku.php [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d |
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 //netteloader=IDataSource,IDibiDriver,IDibiResultDriver,IDibiReflector,DibiDateTime,DibiObject,DibiLiteral,DibiHashMapBase,DibiHashMap,DibiException,DibiDriverException,DibiPcreException,DibiNotImplementedException,DibiNotSupportedException,DibiConnection,DibiResult,DibiResultIterator,DibiRow,DibiTranslator,DibiDataSource,DibiFluent,DibiDatabaseInfo,DibiTableInfo,DibiResultInfo,DibiColumnInfo,DibiForeignKeyInfo,DibiIndexInfo,DibiEvent,DibiFileLogger,DibiFirePhpLogger,dibi,DibiMySqlReflector,DibiMySqlDriver,DibiMySqliDriver,DibiOdbcDriver,DibiSqliteReflector,DibiPdoDriver,DibiPostgreDriver,DibiSqliteDriver,DibiSqlite3Driver | |
/** | |
* dibi - smart database abstraction layer (http://dibiphp.com) | |
* | |
* Copyright (c) 2005, 2012 David Grudl (http://davidgrudl.com) | |
* | |
* For the full copyright and license information, please view | |
* the file license.txt that was distributed with this source code. | |
*/ |
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
[2014-04-22 04-05-50] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102 @ http://up.vpsbar.im/en/public @@ exception-2014-04-22-04-05-50-f3cf5137b37058de5d269f6efb15af27.html | |
[2014-04-22 04-05-59] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /web/lib/dibi.min.php:1102 @ http://up.vpsbar.im/en/public @@ exception-2014-04-22-04-05-50-f3cf5137b37058de5d269f6efb15af27.html | |
[2014-04-22 04-06-10] DibiDriverException: SQLSTATE[HY000]: Cannot execute queries while o |
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
db.<?php | |
require './lib/dibi.min.php'; | |
// DB | |
try { | |
$dsn = new PDO("mysql:host=localhost;dbname=runtime", 'root', '****', array( | |
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8" | |
)); | |
dibi::connect(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 | |
$url = 'https://my.frantech.ca/cart.php?a=add&pid=1'; | |
$content = file_get_contents($url); | |
if (preg_match("/Out of Stock/i", $content)) { | |
echo "我擦,没货!"; | |
} else { | |
echo "我勒个去,终于有货了!"; | |
sendMail(); |
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
Debian with Popobox v1.0 | |
原文链接:http://pear.xiaojiublog.net/2013/11/debian-with-popobox-v1-0/ | |
## 部分内容由 felix021 修正、简化 ## | |
1: 制作Debian系统 | |
mkdir chroot && cd chroot | |
sudo debootstrap --foreign --arch=armel wheezy debian http://ftp.debian.org/debian | |
打包: |
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 include 'header.php'; ?> | |
<script type="text/javascript" language="javascript"> | |
function ChangeTxt(obj){ | |
var val = obj.options[obj.selectedIndex].value; //获取下接框选择的值 | |
document.getElementById("menu").value=val; //将获取的值填写到文本框 | |
} | |
</script> | |
<form action="action.php?kind=<?php echo $_GET["kind"]?> | |
&come=addziliao" method="post"> | |
<div class="container"> |
NewerOlder