doufuxi7093
doufuxi7093
2017-11-25 16:46

警告:include(/../ Classes / PHPExcel / IOFactory.php):无法打开流

已采纳

Im having trouble including the phpexcel when im running it on my local server it's working but after i UP it in some hosting sites it's not working anymore. Can someone help me about this?

line 3

include('/../Classes/PHPExcel/IOFactory.php');

the error

Warning: include(/../Classes/PHPExcel/IOFactory.php): failed to open stream: No such file or directory in /srv/disk11/2468402/www/censored/teacher/data/subject_model.php on line 3

directories

  • teacher

    • Classes

      • PHPExcel
        • IOFactory.php
    • data

      • subject_model.php
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • duanmeng1950 duanmeng1950 4年前

    Use __DIR__ instead.

    include(__DIR__ . '/../Classes/PHPExcel/IOFactory.php');
    
    点赞 评论 复制链接分享