PHP'包含'功能错误

I receive the following error when including a widget;

Warning: include(/includes/template/widgets/leftNavigator.php): failed to open stream: No such file or directory in C:\inetpub\wwwroot\includes\lib\widgets\class.widgets.php on line 8

when running it through using:

public static function getWidget($name) {
    ob_start
        include("/includes/template/widgets/" . strtolower($name) . ".php");
        $content = ob_get_contents();
    ob_end_clean();
    return $content;
}

....
ClassName::getWidget("leftNavigator");

but if I change it too:

public static function getWidget($name) {
    ob_start
        include("/includes/template/widgets/leftNavigator.php");
        $content = ob_get_contents();
    ob_end_clean();
    return $content;
}

it will work fine.

It is called in the files using;

$this->html = preg_replace('~\{widget.(\w+)\}~', Widget::getWidget("$1"), $this->html);

After removing 'strtolower(..)', I still receive the error.

Your files are case sensitive when including other content. Your file has a capital N and strtolower($name) just make all the characters lower case. Instead of having strtolower($name) just do $name or something else.