Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 获取错误警告:未知:无法打开流:第0行未知中的权限被拒绝_Php_Css_Dynamic_Stream_Required - Fatal编程技术网

Php 获取错误警告:未知:无法打开流:第0行未知中的权限被拒绝

Php 获取错误警告:未知:无法打开流:第0行未知中的权限被拒绝,php,css,dynamic,stream,required,Php,Css,Dynamic,Stream,Required,我是php新手,但在其他语言中做了很多开发。我继承了另一个开发人员创建的系统。代码应该显示使用CSS格式化的标准化表单。它应该在右边显示一个导航菜单,带有一个包含动态变化的文本的报头,然后显示一个页面和一些内容。它可以在Mac上本地运行。我已将该项目迁移到PC。当我尝试运行其index.php页面时,会出现以下错误: (!)警告:未知:无法打开流:第0行未知中的权限被拒绝 (!)致命错误:未知:无法在第0行的未知位置打开所需的“C:/wamp/www/styleguide/index.php”(

我是php新手,但在其他语言中做了很多开发。我继承了另一个开发人员创建的系统。代码应该显示使用CSS格式化的标准化表单。它应该在右边显示一个导航菜单,带有一个包含动态变化的文本的报头,然后显示一个页面和一些内容。它可以在Mac上本地运行。我已将该项目迁移到PC。当我尝试运行其index.php页面时,会出现以下错误:

(!)警告:未知:无法打开流:第0行未知中的权限被拒绝

(!)致命错误:未知:无法在第0行的未知位置打开所需的“C:/wamp/www/styleguide/index.php”(include_path=”;C:\wamp\bin\php\php5.5.12\pear)

在浏览了论坛中的类似错误后,我检查了文件权限,所有文件都给了我完全的访问权限,并且不是只读的。我测试了梨,它看起来很好用。Phpinfo显示我有正确的include_路径。我编写的其他php代码在PC上运行良好,可以只需要一次。错误日志显示了相同的消息,因此我无法确定是哪些文件导致了问题

我正在Windows7 64位机器上运行带有ApacheV2.4.9的WampServer2.5和带有PEAR版本1.9.5的PHPV5.5.12。如有任何建议,将不胜感激

以下是Index.php的内容

<?require_once('includes/header.html');
head("Style Guide | Welcome!");
?>
<body id="welcome">
<div class="scroller"></div>
<div class="midcontent">
<?php include("includes/welcome-msthd.html"); ?>
<?php include("includes/welcome-content.html"); ?>
</div>
<div class="holderbox">
<?php include("includes/navs.html"); ?>
</div>
</body>
<HEAD>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</HEAD>
</html>

以下是includes/header.html的内容

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<link rel="shortcut icon" href="http://www.allmysons.com/images/amsfav.ico" type="image/x-icon" />
<link href="css/css3.css" rel="stylesheet" type="text/css" />
<link href='http://fonts.googleapis.com/css?family=Waiting+for+the+Sunrise' rel='stylesheet' type='text/css'>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<META NAME="GOOGLEBOT" CONTENT="NOARCHIVE"> 

<!--Bookmark Code -->
<script type="text/javascript">
function bookmarksite(title,url){
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
} 
else if(document.all)// ie
window.external.AddFavorite(url, title);
}
</script>

<!--Remember to add new IDs for new pages below! -->
<style type="text/css">
#welcome li#welcomelink a,
#generalrulesoverview li#generalrulesoverviewlink a,
#employeeuniform li#employeeuniformlink a,
#generalrulessocialmedia li#generalrulessocialmedialink a,
#logodownloads li#logodownloadslink a,
#logodosanddonts li#logodosanddontslink a,
#logocolors li#logocolorslink a,
#logousageandfonts li#logousageandfontslink a,
#emailtemplate li#emailtemplatelink a,
#emailsignatures li#emailsignatureslink a,
#businesscardoverview li#businesscardoverviewlink a,
#orderabusinesscard li#orderabusinesscardlink a,
#brochureordoorhangeroverview li#brochureordoorhangeroverviewlink a,
#thankyoucards li#thankyoucardslink a,
#orderabrochureordoorhanger li#orderabrochureordoorhangerlink a,
#billboards li#billboardslink a,
#changeofaddressform li#changeofaddressformlink a,
#tshirts2 li#tshirtslink a,
#managershirts li#managershirtslink a,
#otherapparel li#otherapparellink a,
#orderapparel li#orderapparellink a,
#taglines li#taglineslink a,
#truckart li#truckartlink a,
#content-submission li#content-submission-link a,
#orderestimatorfolder li#orderestimatorfolderlink a
{ color: #fff; }
a:link {color: #ccc; text-decoration: none;}
a:visited {text-decoration: none;color: #ccc;}
a:hover {text-decoration: none;color: #fff;}
a:active {text-decoration: none;color: #ccc;}
</style>

<!--Code below dynamically inserts page title (from page) -->
<?php
function head($title){
if(!$title){
$title="Default page title";
}
?>
<title><?php print $title; ?></title>
</head>
<?php } ?>

功能书签站点(标题、url){
if(window.sidebar)//firefox
window.sidebar.addPanel(标题,url,“”);
else如果(window.opera&&window.print){//opera
var elem=document.createElement('a');
elem.setAttribute('href',url);
元素setAttribute(“标题”,标题);
元素setAttribute('rel','sidebar');
元素单击();
} 
else if(document.all)//ie
window.external.AddFavorite(url、标题);
}
#欢迎李#欢迎链接a,
#通用规则服务视图李#通用规则服务视图链接a,
#员工制服李#员工制服链接a,
#一般规则社交媒体李#一般规则社交媒体链接a,
#logo下载li#logo下载链接a,
#logodosanddonts li#logodosanddonts链接a,
#logocolors li#logocolors链接a,
#logousageandfonts li#logousageandfontslink a,
#emailtemplate li#emailtemplatelink a,
#emailsignatures li#emailsignatures链接a,
#商务名片概览李#商务名片概览链接a,
#orderabusinesscard li#orderabusinesscard链接a,
#手册或手册概述李#手册或手册概述链接a,
#谢谢卡片李#谢谢卡片链接a,
#orderabrochureordoorhanger li#orderabrochureordoorhanger链接a,
#广告牌李#广告牌链接a,
#地址变更表li#地址变更表链接a,
#tshirts2 li#tshirtslink a,
#经理衬衫li#经理衬衫链接a,
#otherapparel li#otherapparellink a,
#orderapparel li#orderapparellink a,
#标语li#标语链接a,
#truckart li#truckart链接a,
#内容提交li#内容提交链接a,
#OrderEstimator文件夹li#OrderEstimator文件夹链接a
{颜色:#fff;}
答:链接{color:#ccc;文本装饰:无;}
a:访问{文本装饰:无;颜色:#ccc;}
a:悬停{文本装饰:无;颜色:#fff;}
a:活动{文本装饰:无;颜色:#ccc;}
以下是includes/welcome msthd.html的内容

!--Masthead -->
<div class="versiondate">Version 2.0 | 4-20-12</div>
<div class="header">My Company Name</div>
<div class="header2">Company Style Guide and Resources</div>
<div class="header3">Welcome!</div>
<!--Masthead -->
<div class="versiondate">Version 2.0 | <?php include("includes/updated.html"); ?></div>
<div class="header">All My Sons Moving & Storage</div>
<div class="header2">Company Style Guide and Resources</div>
<div class="header3">Order Estimator Folders</div>
<!--Content -->
<div class="content">
<strong>Some content welcoming the user </strong><br /><br />This is some welcome text <a style="color:#3a7124; text-decoration:underline;" href="mailto:myemail@mycompany.com?subject=Style Guide Help Request">contact us</a> for help.
<div>
<?php include("includes/footer.html"); ?>
</div>
</div>
<!--Content -->
--报头-->
版本2.0 | 4-20-12
我的公司名称
公司风格指南和资源
欢迎
版本2.0|
我所有的儿子搬家和仓储
公司风格指南和资源
订单估计器文件夹
以下是includes/welcome content.html的内容

!--Masthead -->
<div class="versiondate">Version 2.0 | 4-20-12</div>
<div class="header">My Company Name</div>
<div class="header2">Company Style Guide and Resources</div>
<div class="header3">Welcome!</div>
<!--Masthead -->
<div class="versiondate">Version 2.0 | <?php include("includes/updated.html"); ?></div>
<div class="header">All My Sons Moving & Storage</div>
<div class="header2">Company Style Guide and Resources</div>
<div class="header3">Order Estimator Folders</div>
<!--Content -->
<div class="content">
<strong>Some content welcoming the user </strong><br /><br />This is some welcome text <a style="color:#3a7124; text-decoration:underline;" href="mailto:myemail@mycompany.com?subject=Style Guide Help Request">contact us</a> for help.
<div>
<?php include("includes/footer.html"); ?>
</div>
</div>
<!--Content -->

一些欢迎用户的内容

这是一些欢迎帮助的文本。
@Fred ii-:不相关
require
将加载您想要的任何类型的文件,并在其中执行任何
代码块。这意味着您可以获取一个原始二进制文件,在其中嵌入一个代码块,然后执行该代码块。不管它是.html、.php、.zip、.jpg还是其他什么。PHP本身并不关心。这就是为什么我总是说“没有像php脚本这样的东西,只有包含php代码块的文件”。@mark:你把索引文件双重粘贴了吗?这两个代码块是相同的。否则,您的头文件将包含自身,导致无限递归包含。如果关闭短标记,则不会出现任何php错误——毕竟不会执行任何操作。你只需要得到原始的php代码,我发现这个问题是否与你的问题相同,值得研究,以及其中的链接。另外,如果您对系统文件做了任何更改,并且没有重新启动服务,这可能是一个问题。