问题描述:拉取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. Maven依赖冲突解决总结

    转载请注明出处: 1.Jar包冲突的通常表现 Jar包冲突往往是很诡异的事情,也很难排查,但也会有一些共性的表现. 抛出java.lang.ClassNotFoundException:典型异常,主要 ...

  2. zerologon复现

    zerologon漏洞复现 目录 zerologon漏洞复现 漏洞介绍 实验环境 实验开始 一.在github上下载脚本 二.检测是否可以利用 三.利用漏洞 1.清空域控账号密码 2.导出admin凭 ...

  3. CenterOS7上搭建RabbitMQ集群

    1 保证多个主机之间能够互相访问 修改host , vi /etc/hosts 例如修改成下面的内容: 192.168.10.157 rabbitmq-1 192.168.10.159 rabbitm ...

  4. Linux安装PHP8 新版笔记

    PHP部分 官网下载地址:https://www.php.net/downloads.php 我下载的是此时的最新稳定版8.2.3 cd /usr/localwget https://www.php. ...

  5. string str = string.Empty也会出错?

    如题 为什么会出现这种情况?大佬解释一下.

  6. 苹果iPhone 日历查询功能异常

    2022年底苹果发布了IOS16.2版本系统,此时间段内所有升级的用户都将会出现日历查询功能失效,字符错乱等诸多问题. 与客服沟通后告知,日历记录内容查询是没有时间限制的,可以无限期查询全部内容,于是 ...

  7. ansible 离线部署

    1.安装 python 环境 wget https://mirrors.bfsu.edu.cn/anaconda/archive/Anaconda3-2022.10-Linux-x86_64.sh s ...

  8. [WPF]MVVM的数据绑定

    啥是MVVM? 我理解的MVVM是Model(数据),View(界面),ViewModel(数据与界面之间的桥梁)的缩写,是一种编程模式.前期需要多花一些时间去编辑绑定,在后期维护方便.只需要关注数据 ...

  9. 让CSS flex布局最后一行列表左对齐的N种方法

    原文链接https://mp.weixin.qq.com/s?__biz=MjM5MDA2MTI1MA==&mid=2649091838&idx=1&sn=fa4e1ed1e0 ...

  10. springbooot 序列化对象配置

    RbpsemsConfig:    @Bean    @Primary    @ConditionalOnMissingBean(ObjectMapper.class)    public Objec ...