English 中文(简体)
PHP /Windows - Opendir()在具有象征联系的名录内未能开设分局
原标题:PHP / Windows - Opendir() fails opening subdirectories within symbolic linked directories

是否有人知道这个问题的解决办法? I m 无法在具有象征意义的目录内开设一个子公司。 我已确认,道路是正确的(七份复印件和复制件;把道路上走到探索者手中,使其受到罚款)。 这是一种奇怪的、空想的、 b的。

<>>Example:

C: 相联的代谢1dir2 - 开放的代谢2失败。

C: 文献目录

C: 工作周期

C: 笔记本-工程

最佳回答

最后,我发现了一个黑板,用以解决在营地处理窗户上的隔.。 bug是在使用<条码>开启dir(<>>>>/代码>的文档/指令进行检索时发生的。 如果现行名录中存在与名录的链接, opendir(将不读名录中的名录。 它是由S.C.S.St.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.M.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.M.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.M.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S

这方面的例子包括:

<?php

class Filesystem
{
    public static function files($path, $stats = FALSE)
    {
        clearstatcache();

        $ret = array();
        $handle = opendir($path);
        $files = array();

        // Store files in directory, subdirectories can t be read until current handle is closed & statcache cleared.
        while (FALSE !== ($file = readdir($handle)))
        {
            if ($file !=  .  && $file !=  .. )
            {
                $files[] = $file;
            }
        }

        // Handle _must_ be closed before statcache is cleared, cache from open handles won t be cleared!
        closedir($handle);

        foreach ($files as $file)
        {
        clearstatcache($path);

            if (is_dir($path .  /  . $file))
            {
                $dir_files = self::files($path .  /  . $file);

                foreach ($dir_files as $dir_file)
                {
                    $ret[] = $file .  /  . $dir_file;
                }
            }
            else if (is_file($path .  /  . $file))
            {
                $ret[] = $file;
            }
        }

        return $ret;
    }
}

var_dump(filessystem::files( c:\some_path ));

<><>Edit>: 看来,必须在Symlink dir的任何档案处理职能之前,打上clearstatcache($path)。 Php isn t aching symlink d dirs.

问题回答

暂无回答




相关问题
Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

get file icon for Outlook appointment (.msg)

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...

Identifying idle state on a windows machine

I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...

热门标签