(PHP):警告:include_once,无法打开流:权限被拒绝

How*_*ieh 1 php mysql xampp

我正在学习如何使用Php和Mysql(XAMPP)编写注册页面.

现在,我在这个网站上下载了源代码:

http://net.tutsplus.com/tutorials/php/create-a-signup-form-with-email-confirmation/

并试图确保它的工作原理.但是在开放时:

 http://localhost/source/index.php
Run Code Online (Sandbox Code Playgroud)

我收到以下警告:

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
Run Code Online (Sandbox Code Playgroud)

以下是我收到警告的行:

<?php

include_once 'inc/php/config.php';
include_once 'inc/php/functions.php';
.
.
Run Code Online (Sandbox Code Playgroud)

任何帮助?

Yan*_*ang 6

替换这个:

include_once 'inc/php/config.php';
include_once 'inc/php/functions.php';
Run Code Online (Sandbox Code Playgroud)

include_once dirname(__FILE__) . '/inc/php/config.php';
include_once dirname(__FILE__) . '/inc/php/functions.php';
Run Code Online (Sandbox Code Playgroud)