当我用.htaccess文件制作这个项目时,我得到了一个错误。
包括(D:\learnphp\Drupal-7.43\site\pages):打开流失败:在第18行的D:\learnphp\site\index.php中拒绝权限
包含():打开包含的'pages/‘失败(include_path=.;C:\Program(X86)\DevDesktop\path\pear’)在D:\learnphp\drupal-7.43\site\index.php第18行中
这是我的index.php
<?php
// Moved functions to their own file so we can use them in page files.
include('includes/functions.php');
// If this is index.php, we won't get a path, so we need to set it.
$path = isset($_GET['path']) ? $_GET['path'] : 'home.php';
// Render featured products.
$featured_product_output = render_product(get_setting('featured_product_ids'));
// Get some variable to use in the templates.
$company_name = get_setting('company_name');
$year = date('Y');
// Include the file that matches the path name.
include('pages/' . $path);
include('includes/page-template.php');这是.htaccess文件
RewriteEngine on
RewriteCond %[REQUEST_FILENAME] !-f
RewriteCond %[REQUEST_FILENAME] !-d
RewriteRule ^(.*)$ index.php?path=$1 [L,QSA]发布于 2016-10-28 14:26:19
检查目录D:\learnphp\drupal-7.43\site\pages的权限/所有权。
它导入了用户php (执行php脚本的用户)可以访问要包含的文件。
通常,目录拥有0755权限和php文件0644就足够了。
https://stackoverflow.com/questions/40306859
复制相似问题