本文介绍了(PHP):警告:include_once,无法打开流:权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在学习如何使用 Php 和 Mysql (XAMPP) 编写注册页面.
Im learning how to write a Sign Up page using Php and Mysql (XAMPP).
现在,我在这个网站下载了源代码:
Now, I downloaded the source code in this website:
http://net.tutsplus.com/tutorials/php/create-a-signup-form-with-email-confirmation/
并试图确保它有效.但是打开时:
and tried to make sure it works. But when openning:
http://localhost/source/index.php
我收到以下警告:
Warning: include_once(C:\xampp\htdocs\source\inc\php\config.php) [function.include-once]: failed to open stream: Permission denied in C:\xampp\htdocs\source\index.php on line 3
Warning: include_once() [function.include]: Failed opening 'inc/php/config.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\source\index.php on line 3
Warning: include_once(C:\xampp\htdocs\source\inc\php\functions.php) [function.include-once]: failed to open stream: Permission denied in C:\xampp\htdocs\source\index.php on line 4
Warning: include_once() [function.include]: Failed opening 'inc/php/functions.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\source\index.php on line 4
以下是我收到警告的行:
Here are the lines where I got the warnings:
<?php
include_once 'inc/php/config.php';
include_once 'inc/php/functions.php';
.
.
有什么帮助吗?
推荐答案
替换:
include_once 'inc/php/config.php';
include_once 'inc/php/functions.php';
与
include_once dirname(__FILE__) . '/inc/php/config.php';
include_once dirname(__FILE__) . '/inc/php/functions.php';
这篇关于(PHP):警告:include_once,无法打开流:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!