在用php curl 做登录时,如
$str=curl_close($ch);
//curl_setopt($ch, CURLOPT_VERBOSE,0); //注销这行,可不显示返回的信息
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
标记一下
Submitted by admin on 2010, May 29, 11:41 AM
在用php curl 做登录时,如
$str=curl_close($ch);
//curl_setopt($ch, CURLOPT_VERBOSE,0); //注销这行,可不显示返回的信息
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
标记一下
Submitted by admin on 2010, May 28, 9:23 AM
最早接触Linux应用的,好像也就是iptables了
当初在机房里,整天搞这个
印像中,好像以前也有知道过这个,就是只要开了 net.ipv4.ip_forward = 1 就可以代理上网了,记不清了
今早再次确认,标记一下
是在测试VPN时,发现的,开始还觉得奇怪,怎么能上网,呵呵
20101027
可以ping通外网,但其它应用均不行,加上一面两行,可以
iptables -I FORWARD -s 192.168.1.0/255.255.255.0 -j ACCEPT
Submitted by admin on 2010, May 27, 8:35 AM
在有很多屏幕录制的工具,比如“屏幕录像专家”等,这些工具都是收费的,而且用起来很麻烦,所以我向大家推荐camstudio,这是一款免费的屏幕录制工具,大小才1M多,但是功能却非常的全,真是佩服他的作者了。
网站地址:http://www.camstudio.org/
下载地址:http://www.camstudio.org/CamStudio20.exe
Wink
在很多时候,我们需要将在 Linux 桌面上的操作过程录制下来,比如制作屏幕演示、视频教学等。这里将介绍在 Linux 下值得使用的 5 个屏幕录像软件,包括 Istanbul、Wink、Xvidcap、Vnc2swf、Recordmydesktop,希望对有此需求的朋友提供参考。
Istanbul
使用 Istanbul,你可以将 Linux 屏幕上的一切操作过程录制下来。Istanbul 既能够按照你的需要录制全屏、区域或者窗口,也可以录制声音和鼠标指针,最终会生成 Ogg Theora 格式的视频文件。
下载网址:http://linux.softpedia.com/get/Utilities/Istanbul-12358.shtml Wink
Wink 是录制 Flash 视频演示的极好工具,除支持 Linux 平台外,也能够在 Windows 系统上运行。你可以使用 Wink 为所录制的文件添加文字说明和声音旁白。
下载地址:http://debugmode.com/wink/download.php Xvidcap
Xvidcap 支持生成 avi、mpeg、asf、flv、swf、mov 等视频格式,可以应用在各种场合。录制的区域也可以随意选择,显得非常方便。
下载地址:http://download.chip.eu/cn/xvidcap-1.1.5_759489.html Vnc2swf
Vnc2swf 是继 Wink 外适合在 Linux 中使用的另一个 Flash 录制工具,但比 Wink 稍微要难用点,而且也没有 Wink 功能全面。
下载地址:http://linux.softpedia.com/get/Multimedia/Graphics/vnc2swf-pyvnc2swf-19293.shtml Recordmydesktop
Recordmydesktop 功能主要有:可录制全屏、窗口,也可以录制选择的区域;除了能够录制视频的基本功能之外,还能够录制音频;有一些录制的参数可以调整;生成的视频格式为 ogg。它默认提供 GTK+ 界面,另外也有一个适合 KDE 桌面环境的 reKordmydesktop。
下载地址:http://linux.softpedia.com/get/Multimedia/Video/recordMyDesktop-15059.shtml
Submitted by admin on 2010, May 26, 12:28 AM
php-5.2.13/sbin/php-fpm restart
Shutting down php_fpm done
Starting php_fpm Failed loading /usr/local/Zend/lib/ZendExtensionManager.so:
/usr/local/Zend/lib/ZendExtensionManager.so: wrong ELF class: ELFCLASS32 done
安装X86_64版
Submitted by admin on 2010, May 25, 9:19 AM
之前也做过一次,有好几种方式,但忘记了,又不找到记录了,超郁闷
现记录下这个
for i in `cat t.txt`;do echo $i | tr '\n' ',';done
Submitted by admin on 2010, May 23, 5:56 PM
mb_convert_encoding($str,"GBK","UTF-8");
in_array($t1,$t2) //判断t2数组中是否有t1的值
删除指定值
$k=array_search($url,$au);
unset($au[$k])
Submitted by admin on 2010, May 19, 12:06 PM
#!/bin/bash
# water QQ:5846690
MYSQL="/www/servers/mysql"
MYSQL_BIN=$MYSQL/bin/mysql
MYSQL_DATA=$MYSQL/var
USER="root"
PASS="password"
CFL="/tmp/mm.log"
function SAVE_CF {
$MYSQL_BIN -u$USER -p"$PASS" -e "show master status\G" | grep "File:" | awk -F": " '{print $2}' > $CFL
echo "save cf sucess"
}
if [[ -f $CFL ]];then
CF=`cat $CFL`
if [[ -f $MYSQL_DATA/$CF ]];then
$MYSQL_BIN -u$USER -p"$PASS" -e "PURGE MASTER LOGS TO '$CF';"
echo "del log sucess"
fi
SAVE_CF
else
SAVE_CF
fi
加入cron,每周执行一次
05 3 * * 1 root /bin/mysql_log_clear.sh
Submitted by admin on 2010, May 18, 7:10 PM
specified for parameter 'sendfile'
sysdeputil.c:186: error: storage class specified for parameter 'environ'
sysdeputil.c:187: error: storage class specified for parameter 's_proctitle_space'
sysdeputil.c:187: error: parameter 's_proctitle_space' is initialized
sysdeputil.c:188: error: storage class specified for parameter 's_proctitle_inited'
sysdeputil.c:188: error: parameter 's_proctitle_inited' is initialized
sysdeputil.c:189: error: storage class specified for parameter 's_p_proctitle'
sysdeputil.c:189: error: parameter 's_p_proctitle' is initialized
sysdeputil.c:201: error: storage class specified for parameter 'do_sendfile'
sysdeputil.c:202: error: storage class specified for parameter 'vsf_sysutil_setproctitle_internal'
sysdeputil.c:203: error: storage class specified for parameter 's_proctitle_prefix_str'
sysdeputil.c:278: error: storage class specified for parameter 's_pamh'
sysdeputil.c:279: error: storage class specified for parameter 's_pword_str'
sysdeputil.c:281: error: storage class specified for parameter 'pam_conv_func'
sysdeputil.c:282: error: storage class specified for parameter 'vsf_auth_shutdown'
sysdeputil.c:288: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:383: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:398: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:436: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:474: error: storage class specified for parameter 'do_checkcap'
sysdeputil.c:478: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:497: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:514: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:527: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:604: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:641: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:796: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:803: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:809: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:856: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:889: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:930: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:935: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:976: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1012: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1128: error: storage class specified for parameter 's_uwtmp_inserted'
sysdeputil.c:1129: error: storage class specified for parameter 's_utent'
sysdeputil.c:1134: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1173: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1189: error: old-style parameter declarations in prototyped function definition
sysdeputil.c:162: error: parameter name omitted
sysdeputil.c:162: error: parameter name omitted
sysdeputil.c:162: error: parameter name omitted
sysdeputil.c:1189: error: expected '{' at end of input
make: *** [sysdeputil.o] Error 1
这几个包可能不是REDHAT的,这个问题的原因是sysdeputil.c 文件出错,真正解决方法是给其打补丁:
# patch sysdeputil.c attachment.bin
# make
attachment.bin 的位置在:http://linuxfromscratch.org/pipe ... 9f56/attachment.bin
注明: 当前目录为vsftp**/