Не удалось открыть «страницы /» для включения (include_path = '; C: \ Program Files (x86) \ DevDesktop \ common \ pear') index.php в строке 18

Когда я делаю проект с файлом .htaccess, у меня есть ошибка.

  1. Первая ошибка

include (D: \ learnphp \ drupal-7.43 \ site \ pages): не удалось открыть поток: разрешение отклонено в D: \ learnphp \ site \ index.php в строке 18

  1. Второй –

include (): Не удалось открыть «страницы /» для включения (include_path = '; C: \ Program Files (x86) \ DevDesktop \ common \ pear') в D: \ learnphp \ drupal-7.43 \ site \ index.php on строка 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] 

Проверьте разрешения / право собственности на каталоги D: \ learnphp \ drupal-7.43 \ site \ pages .

Импортируется пользовательский php (пользователь, который выполняет ваши php-скрипты) имеет доступ к файлам, которые нужно включить.

Обычно для каталогов достаточно иметь разрешения 0755 и для php-файлов 0644.