风火家人开发记要

技术总结精华贴

Year: 2011

CMS, 原创

解决Codeigniter的No input file specified错误Codeigniter(CI) error No input file specified

解决方法: 在网站根目录中找到php5.ini文件(如果没有就自己建一个),在文件中添加以下内容: cgi.fix_pathinfo = 1 解释:出现No input file specified错误的原因是php没有识别出pathinfo导致的,这是因为很多虚拟主机比如godaddy的,使用的是cgi模式(估计是为了同时兼容php4和php5)来运行php,因此会出现一些奇怪的问题。可以查看phpinfo看到“Server API: CGI/FastCGI”确认这一点。solution: At your website root directory edit php5.ini(If no this file,add one), and in this file add this: “cgi.fix_pathinfo = 1” why No input file specified? the reason is that php cannot distinguish pathinfo from it. many virtual machines ,like godaddy, use the mode of cgi,(perhaps to Compatible with php4 and php5) to run php. you will found that “Server API: CGI/FastCGI”” in phpinfo. (821)

查看全文
CMS, 原创

codeigniter(CI)图片处理不成功原因之GD库支持还是不支持

CI2.02 或者2.00在上传图片后处理图片发现,打水印或者改大小的总是不成功,将错误信息显示出来发现提示Your server does not support the GD function required to process this type of image. 以为真是像这句话提示的那样服务器不知道GD库?如果是支持呢,为什么还是这样的提示呢。 查下Image_lib.php中的代码发现是 在函数image_create_gd()处理时候的时候获取不到this->image_type的值,于是出现了上面的提示。 解决方法,最简单的解决方式就是在image_create_gd()的这句话$image_type = $this->image_type;前面加上$this->get_image_properties($path, FALSE);。加这句的意思很明显就是给image_type赋值。这样,整个世界平静了。一切归于正常。 (1535)

查看全文
html & html5, 原创

IE6,IE7,li 间距被莫名拉大

有时候在使用ul,li 的时候 发现 li 的间距被莫名拉大,导致的结果自然是FF等正常显示,而IE6,7却间距太大而影响美观。 用IE-TESTER 测试发现li下面莫名多出一部分,但又不属于该li的东西。 原因:如果你在ul中定义了padding,这个padding会继承到li中去,即便你真对该ul中的li设置了padding 为0 也不行,IE6,7不能识别这个继承的padding,解决方法就是在ul的外面在定义个div来设置你原来在ul中的padding值,ul还是设置padding为0,这样一切归于正常。这个问题跟设置float left rigjht 无关,与display inline 无关。 (769)

查看全文
Javascript, 原创

IE6,IE7 Js设置margin无效,解决方法IE6 IE7 Js set margin donot work resolution

如果你遇到的问题跟我一样:IE6,IE7设置margin 调试发现margin有变化,但在这两个下面显示效果无变化。调试返回页面出现Source code is not available for this location。 这个经过多次测试,以及网络资料发现,在设置这个margin的元素上面增加一个样式zoom:1。发现IE6,IE7便可以运行正常。If you have this problem as mine: IE6,IE7 set margin but donot work. debug found that “Source code is not available for this location”. I test it a lot and found that , add this css  “zoom:1;” to that   element , and It works.   (2327)

查看全文