摘要: 用gd网图片里写文字gd的bug是毫无疑问的。 问题是怎么解决。1:重新编译查找了一下php.ini的设置没有发现相关选项,于是又一个问题来了,这个默认编码是在哪里设置的呢?还是史文大哥牛,发现了PHP 编译参数里面有一个“–enable-gd-jis-conv”的参数十分可疑,Google一下果然发现了很多乱码问题与这个编译参数有关……官方给出的参数说明是“GD: Enable JIS-mapped Japanese font support.”,也就是让GD支持日文编码的字库(可恶,为什么没有支持中文编码字库的编译选项……PHP也国籍歧视么= =b),说白了开启了这个选项的话GD就会把TT 阅读全文
posted @ 2012-06-28 18:03 johnsonshu 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 这个站点是最好用的http://converticon.com/ 阅读全文
posted @ 2012-06-28 18:01 johnsonshu 阅读(131) 评论(0) 推荐(0) 编辑
摘要: ffmpeg -i aaa.wmv -an -b 512k -r 25 -vf crop=150:100:0:2 -s 150x112.5 out150x100.flv-an:忽略音频 或者可以用 -ar 22050 -b 512k : 数据采集率? 对画质很有影响-r 25: 每秒帧数-vf crop: 缩放之后的,窗口大小剪切参数-s: 缩放参数另外一个例子ffmpeg -i yourfile.mov -acodec mp3lame -vcodec flv outputfile.flv 阅读全文
posted @ 2012-06-28 18:00 johnsonshu 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 参考站点:http://hudeyong926.iteye.com/blog/1047304# <?php # // *nix # echo DIRECTORY_SEPARATOR; // / # echo PHP_SHLIB_SUFFIX; // so # echo PATH_SEPARATOR; // : # # // Win* # echo DIRECTORY_SEPARATOR; // \ # echo PHP_SHLIB_SUFFIX; // dll # echo PATH_SEPARATOR; // ; # ?> f (st... 阅读全文
posted @ 2012-06-28 17:59 johnsonshu 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 好象需要序列化之后才能保存,取得时候再反序列化还原如果不这样的话,出现 [instance of __PHP_Incomplete_Class given]错误? $cond = new Search_Cond_Tour(); if ($cond_to_session) { $cond->_customer_type = $_POST['customer_type']; $cond->_tour_type = $_POST['tour_type... 阅读全文
posted @ 2012-06-28 17:58 johnsonshu 阅读(331) 评论(0) 推荐(0) 编辑
摘要: svn在源代码中嵌入作者或版本等信息以前在dreamarts时觉得特别好用。能知道文件名是哪一个调试的时候找的话,就方便多了目前支持5个关键字:Date(修改时间)、Revision(版本)、Author(提交者)、HeadURL(库路径)、Id(前面4个的组合) 必须在eclipse把项目整体给设置一下参考:http://hi.baidu.com/gevilrror/bl ... 87f016a18bb791.htmlHowever keyword substitution is not activated by default from within Eclipse and its SVN 阅读全文
posted @ 2012-06-28 17:56 johnsonshu 阅读(358) 评论(0) 推荐(0) 编辑
摘要: http://www.javaroad.jp/opensource/js_tomcat3.htmLoadModule proxy_module modules/mod_proxy.soLoadModule proxy_ajp_module modules/mod_proxy_ajp.so<Location /docs/>ProxyPass ajp://localhost:8009/docs/</Location> 阅读全文
posted @ 2012-06-28 17:55 johnsonshu 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 2009年的文章?反正安装这个下来,特别容易就装上了。 测试没有问题但编辑文本的话,我还是用vi来的方便。http://www.rackspace.com/knowledge_center/index.php/CentOS_-_Installing_ffmpegLet's add the repository by adding an entry into YUM, the default package manager for CentOS.# sudo nano -w /etc/yum.repos.d/dag.repo You will need to add the follow 阅读全文
posted @ 2012-06-28 17:53 johnsonshu 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 上网调查,有的说是ghostscript8.7安装包的事http://thomas-genin.com/blog/command-line-2/ghostscript-convert-error-undefined-in-findresource/写了一堆,感觉不是针对日文pdf的,所以搜索关键字加上了 Adobe-Japan1 ,终于出现了靠谱的文章http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=149341) installed Japanese-support yum groupinstall jap 阅读全文
posted @ 2012-06-28 17:52 johnsonshu 阅读(667) 评论(0) 推荐(0) 编辑
摘要: find ./ -type d -print0 |xargs -0 chmod 777 阅读全文
posted @ 2012-06-28 17:50 johnsonshu 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 如果不能随心制定下载方式的话,查查这些参数 header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.$f_name.'"'); header('Content-Length: ' . filesize($f_full));另外,CI里有download he 阅读全文
posted @ 2012-06-28 17:49 johnsonshu 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 1) php.ini文件的位置查看,可以用 [php --ini]查看,apache的时候,写个php调用phpinfo()函数进行查看 2) 编译单个模块 参考:http://mattiasgeniar.be/2008/09/ ... nsions-from-source/ 以mysqli作例子 1. cd php-5.3.6/ext/mysqli 2. phpize 3. ln -s /usr/lib/libmysqlclient.so /usr/lib/mysql/libmysqlclient.so 4. ./configure 5. make 6. cp /root/php-5.3.6 阅读全文
posted @ 2012-06-28 17:48 johnsonshu 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 参考:http://codeigniter.com/forums/viewthread/96428/ Before the query runs: $this->db->_compile_select();And after it has run: $this->db->last_query(); 阅读全文
posted @ 2012-06-28 17:47 johnsonshu 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 参考: http://developer.51cto.com/art/200912/167105.htm http://blog.csdn.net/feng_sundy/archive/2008/10/15/3080862.aspxMAX_FILE_SIZE 隐藏字段(单位为字节)必须放在文件输入字段之前,其值为接收文件的最大尺寸。这是对浏览器的一个建议,PHP 也会检查此项。在浏览器端可以简单绕过此设置,因此不要指望用此特性来阻挡大文件。实际上,PHP 设置中的上传文件最大值是不会失效的。但是最好还是在表单中加上此项目,因为它可以避免用户在花时间等待上传大文件之后才发现文件过大上传失败的麻烦 阅读全文
posted @ 2012-06-28 17:46 johnsonshu 阅读(267) 评论(0) 推荐(1) 编辑
摘要: 在iptables的设置上受尽折磨。 最后发觉问题在于vmware的nat网关, 对于生成的vpn网卡的ip,不知道怎么去路由。 所以必须做一个SNAT才可以。 参考文章:http://man.chinaunix.net/network/iptables-tutorial-cn-1.1.19.html网络环境: vmnet8: NAT网关,vmware客户机通过这个网关上internet 192.168.44.0 网关地址 192.168.44.2 vmnet2: XP系统与CentOS构建的局域网CentOS的eth0:192.168.44.131 eth1:192.168.72.128 X 阅读全文
posted @ 2012-06-28 17:45 johnsonshu 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 感觉说的挺靠谱的,但没有试过http://hi.baidu.com/li_zhongnan/blog/item/318effa9314ddbfa1f17a25a.html如果想正确显示UTF-8字符,可以按照以下步骤操作:1、打开CMD.exe命令行窗口2、通过 chcp命令改变代码页,UTF-8的代码页为65001chcp 65001执行该操作后,代码页就被变成UTF-8了。但是,在窗口中仍旧不能正确显示UTF-8字符。3、修改窗口属性,改变字体在命令行标题栏上点击右键,选择"属性"->"字体",将字体修改为True Type字体"Lu 阅读全文
posted @ 2012-06-28 17:43 johnsonshu 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 当实行的php语句正好在行末的时候,解释出来的文本会把换行给吃掉。做一般的web时倒是没有什么问题,php做邮件模板的时候问题就出来了。当然,解决方法很简单,后面再放个空格就解决了。(或者多给一个回车让它吃去)参照文章:http://shiflett.org/blog/2005/oct/php-stripping-newlines 阅读全文
posted @ 2012-06-28 17:42 johnsonshu 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 必须上传到服务器之后才可以运行。好像是flash的安全限制http://stackoverflow.com/questions/2083128/youtube-api-not-firing-onyoutubeplayerreadyYou need to be on a web server with your test script, as stated in the documentation:Note: To test any of these calls, you must have your file running on a webserver, as the Flash playe 阅读全文
posted @ 2012-06-28 17:40 johnsonshu 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 参考:http://www.richardlord.net/blog/dates-in-php-and-mysql$mysqldate = date( 'Y-m-d H:i:s', $phpdate );$phpdate = strtotime( $mysqldate ); 阅读全文
posted @ 2012-06-28 17:38 johnsonshu 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 用maven编译了google的示例代码,在eclipse里却找不到jar的类库。网上找到了这个帖子,默认是下载到C:\Users\Administrator\.m2下面,通过修改settings.xml的localRepository可以修改路径http://www.mkyong.com/maven/where-is-maven-local-repository/ 阅读全文
posted @ 2012-06-28 17:37 johnsonshu 阅读(139) 评论(0) 推荐(0) 编辑