【发布时间】:2017-09-10 22:54:25
【问题描述】:
我在 ubuntu 上使用 php 5.6,但是当我运行命令 php /var/www/html/export-sftp-bg.php 我得到
PHP 致命错误:在 /var/www/html/inc/vendor/faisalman/simple-excel-php/src/SimpleExcel/Parser/BaseParser.php 中带有消息“文件不存在”的未捕获异常“异常” :174 堆栈跟踪:
0 /var/www/html/inc/vendor/faisalman/simple-excel-php/src/SimpleExcel/Parser/CSVParser.php(38): SimpleExcel\Parser\BaseParser->isFileReady(false)
1 /var/www/html/inc/functions.php(1448): SimpleExcel\Parser\CSVParser->loadFile(false)
2 /var/www/html/export-sftp-bg.php(10): export_existing_campaign('Yml=', Object(SimpleExcel\SimpleExcel), Object(NotORM), '/var/www/html/e ...')
3 {主要} 在第 174 行的 /var/www/html/inc/vendor/faisalman/simple-excel-php/src/SimpleExcel/Parser/BaseParser.php 中抛出
但我可以使用 cd /var/www/html 运行该文件 然后是 php export-sftp-bg.php
【问题讨论】:
-
我的猜测是
export-sftp-bg.php试图转换的文件路径是相对的。