问题描述:拉取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. Spring Cloud Openfeign Get请求发生405错误

    kust-retrieve服务 @Resource private AuthFeignService authFeignService; @ApiOperation("获取用户信息" ...

  2. Spring依赖注入问题

    记录一下最近复习的Spirng依赖注入问题 主要介绍两个注入方式 也是用的最多的 1.构造方法注入 2.Setter注入. 参考文档:https://blog.csdn.net/weixin_5541 ...

  3. python 操作 WhiteSpace 语言

    python 操作 WhiteSpace语言 目录 python 操作 WhiteSpace语言 1 WhiteSpace 简介 2 Python 操作栈流程 1 WhiteSpace 简介 Whit ...

  4. CCRD_TOC_2008年第6期

    中信国健临床通讯 2008年第6期 EULAR专辑 目 录   类风湿关节炎 1. 积极的上台阶治疗策略让早期RA患者获得持久临床缓解 van DR Woude D, et al. EULAR 200 ...

  5. ASAS-CoMoSpA研究: 评价SpA不同分类标准的表现

    ASAS-CoMoSpA研究: 评价SpA不同分类标准的表现 EULAR2015; PresentID: OP0037 THE PERFORMANCE OF DIFFERENT CLASSIFICAT ...

  6. 火山引擎 DataLeap:揭秘字节跳动数据血缘架构演进之路

    更多技术交流.求职机会,欢迎关注字节跳动数据平台微信公众号,回复[1]进入官方交流群 DataLeap 是火山引擎数智平台 VeDI 旗下的大数据研发治理套件产品,帮助用户快速完成数据集成.开发.运维 ...

  7. SpringMVC基础源码分析(一)

    实现Controller的三种方式分析 每种实现的方式对应的HanderAdapter都不同. 实现Controller接口 该接口对应的HanderAdapter为SimpleControllerH ...

  8. python 2.7中matplotlib的所有版本

    matplotlib versions: 0.86, 0.86.1, 0.86.2, 0.91.0, 0.91.1, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0, ...

  9. Kubernetes 网络模型基础指南

    Kubernetes 是为运行分布式集群而建立的,分布式系统的本质使得网络成为 Kubernetes 的核心和必要组成部分,了解 Kubernetes 网络模型可以使你能够正确运行.监控和排查应用程序 ...

  10. thinkphp5框架使用总结

    因为采用了mvc模式,所以理解上为了简便,把控制中心作为一个浏览对象去处理,其他不要去考虑只把它们当做附属物 一.路径访问方式 http://网址/index.php/模块/控制器/操作.html 其 ...