1

我正在学习如何使用 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';
.
.

有什么帮助吗?

4

3 回答 3

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';
于 2013-04-30T11:05:33.690 回答
0

出于安全原因,大多数时候在 PHP 中禁用这样的完整路径,尝试将包含语句中的路径更改为相对路径。

于 2012-07-07T12:13:42.407 回答
0

尝试将文件夹权限设置为“754”。只有文件夹权限。

于 2020-07-20T21:48:53.600 回答