【问题标题】:php require($file) : failed to open streamphp require($file) : 无法打开流
【发布时间】:2018-01-13 02:15:37
【问题描述】:

我正在用 yii2 Advance 写代码。

警告:需要($file):无法打开流:没有这样的文件或 目录在 C:\xampp\htdocs\Yii-Dummy\vendor\composer\autoload_real.php 在第 66 行 致命错误:require():打开所需的“$file”失败 (include_path='C:\xampp\php\PEAR') 在 C:\xampp\htdocs\Yii-Dummy\vendor\composer\autoload_real.php 上线 66.

这个问题告诉我。请告诉我我该怎么办。

【问题讨论】:

  • 更正你的路径
  • 如何更正我的路径..请帮助我。
  • autoload_real.php 第 66 行的内容是什么?看起来$file 变量没有得到扩展。最好的选择是先运行composer

标签: php mysql yii yii2-advanced-app yii-components


【解决方案1】:

您的代码似乎将C:\xampp\php\PEAR 路径作为文件传递给required,检查您的代码并解决它! 它必须是文件路径而不是文件夹路径,并且如果您传递了文件路径;检查通过的文件是否存在。

【讨论】:

  • 警告:需要(C:\xampp\htdocs\Yii-Dummy\frontend\web/../../vendor/yiisoft/yii2/Yii.php):无法打开流:否第 6 行 C:\xampp\htdocs\Yii-Dummy\frontend\web\index.php 中的此类文件或目录致命错误:require(): Failed opening required 'C:\xampp\htdocs\Yii-Dummy\frontend\ web/../../vendor/yiisoft/yii2/Yii.php' (include_path='C:\xampp\php\PEAR') 在 C:\xampp\htdocs\Yii-Dummy\frontend\web\index.第6行的php
猜你喜欢
  • 2019-12-03
  • 2012-05-14
  • 2020-07-27
  • 2012-08-04
  • 1970-01-01
  • 2011-04-03
  • 2018-11-21
  • 1970-01-01
相关资源
最近更新 更多