Home > Backend Development > PHP Tutorial > 关于require (strtolower($object) . '.class.php')的有关问题

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

WBOY
Release: 2016-06-13 13:18:40
Original
870 people have browsed it

关于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()函数,我不知道这能带来什么好处
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template