【问题标题】:How to fix PHP Warning: file_exists(): File name is longer than the maximum allowed path length on this platform (260)?如何修复 PHP 警告:file_exists():文件名超过此平台上允许的最大路径长度 (260)?
【发布时间】:2014-02-08 00:28:53
【问题描述】:

正如您在下面看到的,我正在使用 WYSIWYG tiny_mce 和 ibrowser。我收到此错误:

> PHP Warning:  file_exists(): File name is longer than the maximum
> allowed path length on this platform (260):
> C:\Inetpub\vhosts\xxx.com\demos.xxx.com\qa\xxx\assets\js\plugin\tiny_mce\plugins\ibrowser\scripts\phpThumb\cache\5\56\56b\56b7\phpThumb_cache_demos.xxx.com__src56b72e3bbea26ba9aec8b0449cabc81d_par0b9e73569dbbfe81d5e1ff2a11d92887_dat1389704510.jpeg
> in
> C:\Inetpub\vhosts\xxx.com\demos.xxx.com\qa\xxx\assets\js\plugin\tiny_mce\plugins\ibrowser\scripts\phpThumb\phpThumb.php
> on line 588

第 588 行

    if (is_writable(dirname($phpThumb->cache_filename)) || (file_exists($phpThumb->cache_filename) && is_writable($phpThumb->cache_filename))) {

            $phpThumb->CleanUpCacheDirectory();
            if ($phpThumb->RenderToFile($phpThumb->cache_filename) && is_readable($phpThumb->cache_filename)) {
                chmod($phpThumb->cache_filename, 0644);
                RedirectToCachedFile();
            } else {
                $phpThumb->DebugMessage('Failed: RenderToFile('.$phpThumb->cache_filename.')', __FILE__, __LINE__);
            }

        } else {

            $phpThumb->DebugMessage('Cannot write to $phpThumb->cache_filename ('.$phpThumb->cache_filename.') because that directory ('.dirname($phpThumb->cache_filename).') is not writable', __FILE__, __LINE__);

        }

我该如何解决这个问题?

【问题讨论】:

  • 当然不要创建超出此限制的路径/文件名。
  • 那不是选择,还有其他解决方案吗??
  • 必须有其他我可以使用的东西来代替不会显示此警告的 file_exists
  • @PeeHaa 这不是一个实用的解决方案
  • 好吧,也许你认为切换到另一个 FS 更实用。

标签: php tinymce file-exists


【解决方案1】:

只需应用消息的建议即可。重新排列文件的结构。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-09-01
  • 1970-01-01
  • 2017-05-27
  • 1970-01-01
  • 2020-09-14
相关资源
最近更新 更多