我在ubuntu=“\”;使用PHP7.2
在Kubuntu18和PHP7.2下,我尝试使用目录分隔符(我的客户端使用windows) 但当保存的文件名为:我在ubuntu=“\”;使用PHP7.2,php,Php,在Kubuntu18和PHP7.2下,我尝试使用目录分隔符(我的客户端使用windows) 但当保存的文件名为: weather\export\weather_1583310986.csv 看起来像 我的ubuntu=“\”上的目录\u分隔符 我这方面的一些错误配置 $ php -v PHP 7.2.24-0ubuntu0.18.04.3 (cli) (built: Feb 11 2020 15:55:52) ( NTS ) Copyright (c) 1997-2018 T
weather\export\weather_1583310986.csv
看起来像
我的ubuntu=“\”上的目录\u分隔符
我这方面的一些错误配置
$ php -v
PHP 7.2.24-0ubuntu0.18.04.3 (cli) (built: Feb 11 2020 15:55:52) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.24-0ubuntu0.18.04.3, Copyright (c) 1999-2018, by Zend Technologies
serge@athoe:/mnt/_work_sdb8/wwwroot/lar/maritime_industry/prime_watch$ php -a
Interactive mode enabled
php > echo DIRECTORY_SEPARATOR;
/
php >
谢谢 只需使用
$dir_separator='/'
而不是DIRECTORY\u SEPARATOR
,因为DIRECTORY\u SEPARATOR
会导致很多问题。这不应该正常发生,我在Ubuntu18上用7.2测试了它,结果显示/(应该是这样的)。你能给我们提供php-v和php-a echo目录的结果吗;我添加了配置参数$dir_分隔符是什么?环境中的参数?
$ php -v
PHP 7.2.24-0ubuntu0.18.04.3 (cli) (built: Feb 11 2020 15:55:52) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.24-0ubuntu0.18.04.3, Copyright (c) 1999-2018, by Zend Technologies
serge@athoe:/mnt/_work_sdb8/wwwroot/lar/maritime_industry/prime_watch$ php -a
Interactive mode enabled
php > echo DIRECTORY_SEPARATOR;
/
php >