[英](PHP): Warning: include_once, failed to open stream: Permission denied
Im learning how to write a Sign Up page using Php and Mysql (XAMPP).我正在学习如何使用 Php 和 Mysql (XAMPP) 编写注册页面。
Now, I downloaded the source code in this website:现在,我在这个网站下载了源代码:
http://net.tutsplus.com/tutorials/php/create-a-signup-form-with-email-confirmation/ 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
I got the following warnings:我收到以下警告:
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';
.
.
Any Help?任何帮助?
Replace this:替换这个:
include_once 'inc/php/config.php';
include_once 'inc/php/functions.php';
with和
include_once dirname(__FILE__) . '/inc/php/config.php';
include_once dirname(__FILE__) . '/inc/php/functions.php';
大多数情况下,出于安全原因,PHP 中禁用了像这样的完整路径,请尝试将包含语句中的路径更改为相对路径。
Try to set the folder permission to '754'.尝试将文件夹权限设置为“754”。 Only the folder permission.只有文件夹权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.