问题描述:拉取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. vue原理:diff、模板编译、渲染过程等

    一.虚拟DOM: 因为DOM操作非常消耗性能,在操作DOM时,会出现DOM的回流(Reflow:元素大小或者位置发生改变)与重绘(元素样式的改变)使DOM重新渲染. 现在的框架Vue和React很少直 ...

  2. appium 在linux安装和使用(持续更新)

    appium V1.10 centos7.4 安装 安装步骤 1. 安装node 为了得到npm(node package manager,nodejs的安装包管理工具,可以通过npm来下载appiu ...

  3. A*算法小记

    \(\text{A*}\) 一种启发式搜索 和暴搜的差别是多了一个估价函数,每次取出一个估算最优的状态以期更高效完成任务 重点在于估价函数 \(\text{h*(n)}\) 的设计,若实际代价为 \( ...

  4. 【USACO 2021 January Contest, Platinum】Problem 1. Sum of Distances

    \(\text{Solution}\) 一个性质:两个 \(K\) 元组有边相连当且仅当每个点在对应的图中到 \(1\) 有奇偶性相同的路径 那么我们就可以预处理每个图中的点到 \(1\) 的奇偶最短 ...

  5. LG P4146 序列终结者

    \(\text{Problem}\) 支持区间加区间翻转区间最大值 \(\text{Solution}\) \(\text{FHQ-Treap}\) 两个标记加与翻转 然后维护区间最大值 \(\tex ...

  6. Destroying Roads

    题目链接 \(Destroying\) 分析 又是变形了的最短路 我们可以考虑哪些道路必须被保留 然后枚举两个起点到终点重复的道路 考虑公合法用这些道路就可以了 \(Code\) #include&l ...

  7. TikTok 推荐引擎强大的秘密

    作者:Heorhii Skovorodnikov 深入研究TikTok令人惊叹的实时推荐系统的内部工作原理,了解是什么使它成为该领域最好的产品之一. 为什么TikTok的feed如此让人上瘾?秘诀在于 ...

  8. 【django-vue】前端取消默认样式 main.js配置 后端主页模块接口 跨域问题详解 项目自定义配置 git介绍和安装

    目录 回顾 上节课回顾 今日内容 1 前端全局样式和js配置 1.1 global.css 1.2 settings.js 1.3 main.js 2 后端主页模块接口 三种开发模式 模型父类Base ...

  9. Spring构造函数

    Spring构造函数 目录 Spring构造函数 一.分析说明 2.1.一个构造函数 java版本 xml配置版 2.2.多个构造函数 源码思路 为什么分越少优先级越高? 一.分析说明 Spring中 ...

  10. 运行Java时报错:Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'

    卸载旧的JAVA JDK,安装新版的JDK时,运行cmd的java -version命令遇到这样的报错: Error: opening registry key 'Software\JavaSoft\ ...