简体   繁体   English

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

[英](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.

相关问题 WordPress主题中的PHP“警告include_once():无法打开流” - PHP "warning include_once(): Failed to open stream" in Wordpress theme PHP警告:include_once(Net / SMTP.php):无法打开流 - PHP Warning: include_once(Net/SMTP.php): failed to open stream 警告:include_once(../lib/Database.php):无法打开流:没有这样的文件或目录 - Warning: include_once(../lib/Database.php): failed to open stream: No such file or directory 警告:include_once(../ settings / settings.php):无法打开流 - 但路径实际上是正确的? - Warning: include_once(../settings/settings.php): failed to open stream - but the path is actually right? include_once(): 无法打开流:没有这样的文件或目录 - PHP - include_once(): failed to open stream: No such file or directory - PHP Include_once无法打开流 - Include_once failed to open stream 我收到如下错误警告:include_once(C:/xampp/htdocs/timetable/header.php):无法打开流:没有这样的文件或目录 - iam getting errors as follow Warning: include_once(C:/xampp/htdocs/timetable/header.php): failed to open stream: No such file or directory require_once(“ facebook-sdk / facebook.php”)引发警告“无法打开流:权限被拒绝” - require_once(“facebook-sdk/facebook.php”) throws a warning “failed to open stream:Permission denied” 警告无法打开流权限拒绝致命错误require_once PHP + NginX + RHEL in VMware - Warning failed to open stream permission denied fatal error require_once PHP + NginX + RHEL in VMware Zend include_once(myphpfile):无法打开流:没有这样的文件或目录 - Zend include_once(myphpfile): failed to open stream: No such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM