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 send_request_by_fsockopen($url,$post_data=array()){ | |
$url_array = parse_url($url); | |
$hostname = $url_array['host']; | |
$port = isset($url_array['port'])? $url_array['port'] : 80; | |
$requestPath = $url_array['path'] ."?". $url_array['query']; | |
$fp = fsockopen($hostname, $port, $errno, $errstr, 10); | |
if (!$fp) { | |
echo "$errstr ($errno)"; | |
return false; |
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 | |
/* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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
// 先判定宽高比,再判定宽高 | |
$sizeArr = explode("x", $p['screen']); | |
$screenWidth = $sizeArr['0']; | |
$screenHeight = $sizeArr['1']; | |
if ($screenHeight) | |
$wh = $screenWidth / $screenHeight; | |
$tmpArr = array(); | |
// 根据 宽高比最小差值,宽最小差值,高最小差值 进行排序,顶部为最合适的尺寸 | |
foreach ($splashArr as $info) { |
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/sh | |
######################## config ######################## | |
# 升级日志 | |
publish_log_file="/update/log/path/publish.log" | |
# 需要邮件通知的人 | |
master=( | |
i@zhoumengkang.com |
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 | |
ps -ef|grep [h]ujia |awk '{printf "kill -9 %d",$2}'|sh | |
cd /xxx/hujia/ | |
CLASSPATH="." | |
for jar in `ls ./lib` | |
do | |
CLASSPATH="$CLASSPATH:./lib/$jar" | |
done |
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
header('content-type:charset=utf-8'); | |
header("Content-Type:application/msword"); | |
header("Content-Disposition:attachment;filename={$_GET['type']}.doc"); | |
header("Pragma:no-cache"); | |
header("Expires:0"); | |
echo $_GET['content']; |
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
$row['url'] = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; |
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
<a href="png" alt=""/></a> |
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
<p>maybe</p> |
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
表还是原来的5张表: | |
group、user、role、access、node,做的改动是node表增加了一个字段filter_field,用来规定该操作是否要根据角色来过滤字段,可以在节点管理里添加该限制。 | |
access表里增加了一个fields字段,存放该角色在该节点上可以操作的字段列表,可以在后台的授权操作中来设置该列表。 | |
比如, | |
node表有一个显示订单列表的操作index: | |
node_id title filter_field | |
83 列表 1 |