问题描述:拉取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. Eclpis-cannot open git-receive-pack

    转载:https://blog.csdn.net/qq_29954971/article/details/80191193 问题:在采用MyEclipse软件(JDK1.7)作为开发环境,利用GitH ...

  2. 精美的web前端源码的特效

    1.JS自定义烟花特效 这是一款基于JS和Canvas的自定义烟花特效,初始化界面的时候特效是不带声效的绽放,当你点击顶部中间的播放,即可以看到美丽的烟火也可以听到烟花绽放的声音,让你脑海浮现过年团圆 ...

  3. Windows服务安装小工具

    主要为了方便Windows服务的安装卸载,不需要使用CMD命令. 先给大家小工具的效果图: 使用此工具需要注意一下几点: 1.服务程序的.NET Framework版本: 2.服务名称与服务执行程序名 ...

  4. 学习Java Day15

    今天学习了自定义类

  5. JZOJ 1077. 【GDKOI2006】防御力量

    \(\text{Solution}\) 首先这个题目描述得不清不楚 反正做法是过 \(A\) 城引一条直线,算出直线两侧点数的 \(min\) 找到最优直线,即 \(min\) 最小的 那么重点在判断 ...

  6. LeetCode-825 适龄的朋友

    来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/friends-of-appropriate-ages 题目描述 在社交媒体网站上有 n 个用户. ...

  7. Tensorflow1.0版本与以前函数不同之处

    大部分是Api版本问题: AttributeError: 'module' object has no attribute 'SummaryWriter' tf.train.SummaryWriter ...

  8. django-drf知识点梳理

  9. SAP FBL1N屏幕增强,增加自定义的列

    需求 因财务想要在查看未清和已清凭证的时候,看到是该凭证是否哪一个采购人员创建,因此新增一列创建人,关联关系是 EKKO-EBELN=BSEG-ZUONR,这里关联分配号是因为之前开发自动清账的时候做 ...

  10. JS 动态获取 Url 参数(封装函数)

    话不多说直接上代码: 封装函数如下: (如果urls固定,可以只写一个name变量) getQueryString(name, urls) { var url = urls; // 获取URL // ...