Home > Backend Development > PHP Tutorial > 新手有关问题 PHP的failed to open stream有关问题 windowsXP系统

新手有关问题 PHP的failed to open stream有关问题 windowsXP系统

WBOY
Release: 2016-06-13 10:09:29
Original
1104 people have browsed it

新手问题 PHP的failed to open stream问题 windowsXP系统
我在本机上安装了wamp架了一个服务器,然后我在php里
require_once "HTML/Template/IT.php";
然后运行就出现
Warning: require_once(HTML/Template/IT.php) [function.require-once]: failed to open stream: No such file or directory in D:\Program Files\wamp\www\example8-2.php on line 7

Fatal error: require_once() [function.require]: Failed opening required 'HTML/Template/IT.php' (include_path='.;C:\php5\pear') in D:\Program Files\wamp\www\example8-2.php on line 7

我已经安装了HTML_Template_IT包了。 网上说什么权限什么的我有点晕。
 能否帮我解答一下这个疑问啊? 或者设置权限的详细步骤?

小弟第一次学习PHP 很多地方不懂 请多指教 谢谢了!

------解决方案--------------------
No such file or directory
路径放错了吧...

从这个路径 D:\Program Files\wamp\www\example8-2.php 

推测出位置应该是放 D:\Program Files\wamp\www\HTML\Template\IT.php

或者把require_once "HTML/Template/IT.php";
改成IT.php所在的绝对路径,比如require_once "D:\Program Files\wamp\www\HTML\Template\IT.php";
------解决方案--------------------
嗯路径错误,不是你写的错误,就是文件放的错误。win下无设置权限的需要。所以检查路径和书写路径是否正确
------解决方案--------------------
你的代码是require_once(PEAR.php);则PEAR.php就必须与IT.php在同级目录才行。

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