我正在学习如何使用Php和Mysql(XAMPP)编写注册页面。
现在,我在这个网站上下载了源代码:
http://net.tutsplus.com/tutorials/php/create-a-signup-form-with-email-confirmation/
并试图确保它有效。但是在开放时:
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
以下是我收到警告的行:
<?php
include_once 'inc/php/config.php';
include_once 'inc/php/functions.php';
.
.
任何帮助?
答案 0 :(得分:6)
替换它:
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';
答案 1 :(得分:0)
出于安全原因,大部分时间都使用PHP这样的完整路径,请尝试将include语句中的路径更改为相对路径。
答案 2 :(得分:0)
尝试将文件夹权限设置为“ 754”。只有文件夹权限。