问题描述:拉取thinkphp5项目来运行,按照官网的提示都拉取完仓库后,在浏览器访问localhost/tp5/public报错:

Warning: require(C:\wamp\www\tp5\public../thinkphp/base.php): failed to open stream: No such file or directory in C:\wamp\www\tp5\public\index.php on line 15

警告:require(C:\wamp\www\tp5\public../thinkphp/base.php):无法打开流:在第15行的C:\wamp\www\tp5\ppublic\index.php中没有这样的文件或目录

原因:引用base.php的路径写错了。我的写法是:require __DIR__ . '../thinkphp/base.php';但正确的写法为require __DIR__ . '/../thinkphp/base.php';是的,在../路径的前面还要加上一个斜杠/。

解决方案:查看你的引用路径,看看是否正确。

2023-03-01 Warning: require(C:\wamp\www\tp5\public../thinkphp/base.php): failed to open stream: No such file or directory in C:\wamp\www\tp5\public\index.php on line 15的更多相关文章

  1. Warning: require(D:\wamp\www\glink-smart\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in D:\wamp\www\glink-smart\bootstrap\autoload.php on line 1

    Laravel访问出错错误信息:`Warning: require(/vendor/autoload.php): failed to open stream: No such file or dire ...

  2. Laravel5.6安裝:Warning: require(../vendor/autoload.php): failed to open stream: No such file or directory

    在phpstudy下使用composer+laravel安装器的方式安装了Laravel,但是访问的时候报错: Warning: require(D:\phpstudy\WWW\public\mybl ...

  3. Laravel访问出错错误信息:`Warning: require(/vendor/autoload.php): failed to open stream: No such file or dire

    错误信息:`Warning: require(/http/www.mywakavLee.cn/bootstrap/../vendor/autoload.php): failed to open str ...

  4. TP5报错Fatal error: require(): Failed opening required '/home/www/xx/public/../thinkphp/start.php

    https://jingyan.baidu.com/article/afd8f4deb784fe34e386e97b.html https://www.cnblogs.com/300js/p/9224 ...

  5. bash报错./mq.sh: line 15: warning: here-document at line 10 delimited by end-of-file (wanted `eof')

    [root@localhost tmp]# ./mq.sh./mq.sh: line 15: warning: here-document at line 10 delimited by end-of ...

  6. Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/../thinkphp/start.php) is not within the allowed path(s):

    Warning: require(): open_basedir restriction in effect. File(/www/wwwroot//../thinkphp/start.php) is ...

  7. thinkphp5---安装到宝塔出现Warning: require(): open_basedir错误

    使用thinkphp5安装到宝塔的linux上,出现以下错误: Warning: require(): open_basedir restriction in effect. File(/www/ww ...

  8. LNMP - Warning: require(): open_basedir restriction in effect错误解决方法

    LNMP 1.4或更高版本如果不想用防跨目录或者修改.user.ini的防跨目录的目录还需要将 /usr/local/nginx/conf/fastcgi.conf 里面的fastcgi_param ...

  9. Warning: mysql_connect(): No such file or directory 解决方案总结(操作系统: Mac)

    说明: 本文主要内容参考: Mac下PHP连接MySQL报错"No such file or directory"的解决办法, 并进行个人补充 1. 运行环境: Mac OS X 10.11.4 (M ...

  10. Warning: file_put_contents(data.txt): failed to open stream: Permission denied in /Library/WebServer/Documents/test.php on line 22

    最近在学习PHP 在保存文件的时候报Warning: file_put_contents(data.txt): failed to open stream: Permission denied in ...

随机推荐

  1. 【开发宝典】Java并发系列教程(四)

    作者:京东零售 刘跃明 Monitor概念 Java对象的内存布局 对象除了我们自定义的一些属性外,还有其它数据,在内存中可以分为三个区域:对象头.实例数据.对齐填充,这三个区域组成起来才是一个完整的 ...

  2. VS 撰写生成了多个撰写错误,其根本原因有X点,如下所列。有关详细信息,请查看CompositionException.Error属性

    打开VS开发程序,莫名其妙的出现如下图错误: 网上找了很多资料,有前辈说以下方法: 解决方案如下 打开文件夹 Users\<CurrentUser>\AppData\Local\Micro ...

  3. linux 基础(10)进程管理

    使用 ps 观察程序 ps -l ps程序可以查询当前在运行的进程信息.ps -l可以列出详细的信息,默认仅列出当前 bash 相关的进程. sudo -i ps -l F S UID PID PPI ...

  4. 2021级《JAVA语言程序设计》上机考试试题9

    专业负责人功能页 <%@ page language="java" contentType="text/html; charset=UTF-8" page ...

  5. 最大K段和

    题目大意 有一个长度为 \(N\) 的序列 \(A\) .他希望从中选出不超过 \(K\) 个连续子段,满足它们两两不相交,求总和的最大值(可以一段也不选,答案为 \(0\)). 分析 很容易想到 \ ...

  6. Tomcat修改端口号问题

    今日面试问到如何修改Tomcat的问题 懵了 1.第一种就是我们常用的编辑器中 如:Idea中 一键式修改端口号(我只知道这个) 在下面的图 Http port后处修改即可,默认为8080端口 2.第 ...

  7. 比较多普勒超声与临床缓解标准对RA放射学进展的预测效能

    比较多普勒超声与临床缓解标准对RA放射学进展的预测效能 de Miguel, et al. EULAR 2015. Present ID: FRI0586. 原文 译文 FRI0586 DOPPLER ...

  8. 3D场景建模零代码平台

    3D场景建模软件(零基础.零代码.**),是指用来制作场景的软件,分为2D建模和3D建模,二者使用的技术及原理不同. 2D软件:它是用3维几何图形绘制出三维图形的软件,其主要功能是利用软件中已经画好的 ...

  9. springboot加入cloud,并注册到nacos

    pom.xml下新增 <dependency> <groupId>org.springframework.cloud</groupId> <artifactI ...

  10. unity 音频曲线

    jp--------------- https://techblog.kayac.com/dynamic-waveform-generation-without-audio-clip https:// ...