如何修复PHP警告:file_exists():文件名长于此平台上允许的最大路径长度(260)?

时间:2014-01-18 16:39:16

标签: php tinymce file-exists

如下所示,我在ibrowser中使用WYSIWYG tiny_mce。我收到了这个错误:

> 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__);

        }

如何解决问题?

1 个答案:

答案 0 :(得分:0)

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