当前位置: 代码迷 >> PHP >> 关于require (strtolower($object) . '.class.php')的有关问题
  详细解决方案

关于require (strtolower($object) . '.class.php')的有关问题

热度:923   发布时间:2012-09-03 09:48:39.0
关于require (strtolower($object) . '.class.php')的问题
代码require (strtolower($object) . '.class.php');运行出现如下错误提示:

Fatal error: require(): Failed opening required 'pscws3.class.php' (include_path='.;C:\php\pear') in D:\php\wamp\www\scws002\demo.php on line 208
  我将其改为require ".class.php";就运行正常了。 但是这里我不明白为什么要进行大小写转换,有什么意义?正确的写法该是什么?


------解决方案--------------------
防止大小写出错嘛...造成路径不对,强制都转换成小写.要不还能有啥作用?

探讨

这不是重点,我想知道的是,在引用文件的时候,上述代码用到了strtolower()函数,我不知道这能带来什么好处
  相关解决方案