Answer the question
In order to leave comments, you need to log in
Why is the path not found?
Hello!
Project on yii2 basic. Yii swears at non-existent path:
yii\base\View::main(): Failed opening required '/../layouts/_include/yandex-partner.php' (include_path='.;d:/ospanel/modules/php/PHP-7.1;d:/ospanel/modules/php/PHP-7.1/PEAR/pear')
<?php require "/../layouts/_include/yandex-partner.php"; ?>
Answer the question
In order to leave comments, you need to log in
Try specifying the path to the file relative to the site root. For example,
<?php require " $_SERVER['DOCUMENT_ROOT'] . /путь к файлу относительно корня/yandex-partner.php"; ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question