我有一个带有简单文本输出的文件。我想将此文件包含在另一个PHP文件中。当我尝试通过以下方式要求文件时:
<?php require_once ("info.blade.php"); ?>
我收到错误:
Symfony\Component\ErrorHandler\Error\FatalError
Illuminate\View\Engines\PhpEngine::main(): Failed opening required 'info.blade.php' (include_path='C:\xampp\php\PEAR')
如何添加此文件和/或将输出作为变量?这些文件位于同一目录中,我正在使用laravel 7。
您应使用刀片式语法:
@include('info')