IIS6.0建立多个网站发生错乱的问题

这几天一直被一个问题困扰:IIS6.0建了几个网站,可总是访问A,得到的页面却是B。 搜索了无数的帖子,都没有发现问题所在。大家都说只要设置好主机头就可以了,我也是这样做的,可问题还是依旧。 还好,错误不会一直隐藏下去。今晚在微软中国论坛请教了China MVP,他建议我使用两个同名的文件名,然后依照出现问题的方式去访问,但并没有出现那种现象。 不过,由此我也想到,想必是程序出了问题,访问的是A,得到的却是B,可见是IIS找错了文件,而IIS是不可能犯这种错误,那么犯错误的就是我的程序了,所以我断定是程序包含文件的时候路径不对。 突然想起自己以前改过程序,将index.php里的require(‘./xxx.php’)改为了require(‘xxx.php’),所以导致找错文件。果不其然,将这个错误更正以后,就没问题了。 另外,以前遇到过IIS下这种写法报错,今天经过查询,终于知道了这是因为网站目录和上级目录的权限不一致造成的,也就是说只要把上级目录设置和网站目录一样的权限,就可以正确使用这种方法去包含文件。 --->>>以下来自微软网站

By javafuns on March 21, 2008 at 21:16 · Views: 625 · Permalink · RSS · Leave a comment
Categorized in: Operation Systems · Tagged with: ,

wordpress的中文标签问题

中午升级了wordpress到2.3.3,但却发现通过中文标签找不到相关文章,是由于URL附带中文参数的问题。后来在一位老兄博客上,发现了一篇文章,介绍如何解决这个问题。试了试还是不行,自己对php不熟悉,很是头疼啊。 这篇文章是wordpress.org.cn上的,讲的跟上面那位老兄是一个方法: 修改了 wp-includes/classes.php,把第 44 行开始的几行略做修改,修改前的代码: if ( isset($_SERVER['PATH_INFO']) ) $pathinfo = $_SERVER['PATH_INFO']; else $pathinfo = ”; $pathinfo_array = explode(‘?’, $pathinfo); $pathinfo = str_replace(“%”, “%25″, $pathinfo_array[0]); $req_uri = $_SERVER['REQUEST_URI']; 修改后的代码: if ( isset($_SERVER['PATH_INFO']) ) $pathinfo = mb_convert_encoding($_SERVER['PATH_INFO'], “UTF-8″, “GBK”); else $pathinfo = ”; $pathinfo_array = explode(‘?’, $pathinfo); $pathinfo = str_replace(“%”, “%25″, $pathinfo_array[0]); $req_uri = mb_convert_encoding($_SERVER['REQUEST_URI'], [...]

By javafuns on March 16, 2008 at 15:40 · Views: 1,173 · Permalink · RSS · One Comment
Categorized in: Scripts · Tagged with: 

wordpress 迁移到 IIS 上

上个月就搭建了Windows 2003 + IIS + php + Mysql的服务器环境,但一直没多少时间把blog迁移到这上面来。 最近,花了几天时间做迁移,发现了不少问题,最头大的是迁移后blog访问不了,页面打不开,后来将问题定位到php的require函数在Windows上有个怪异的表现:require页面不能使用 ./ 这样的形式,否则保你程序不好用。这个问题不知道是不是在windows上apache也一样。 测试一下代码高亮 public class HelloWorld { public static void main(String[] args) { System.out.println(“hello, world!”); } } public class HelloWorld { public static void main(String[] args) { System.out.println(“hello, world!”); } }

By javafuns on January 8, 2008 at 18:55 · Views: 864 · Permalink · RSS · One Comment
Categorized in: Scripts · Tagged with: , ,

创建了一个支持播放列表的MP3播放器插件

All rights are reserved by original author, please see its licence for detail. See its demo named My iTunes Store at right panel on my blog Download here Installation: 1.untar it and put in wp_content/plugins 2.check to modify the url used in coolplayer.php if necessary 3.go to Admin, activate it in Plugins tab 4.write the [...]

By javafuns on August 24, 2007 at 23:59 · Views: 1,001 · Permalink · RSS · Leave a comment
Categorized in: Scripts · Tagged with: ,
  • Highest Rated

  • My PicasaPhotos

    c5bed429f00441ed98250ac3.jpg

    IMG_0631.JPG

    IMG_0655.JPG

  • RSS My del.icio.us

  • My RSS