PHP opendir( ) function problem
$result = 'false';
if( opendir( $this->OuterTemplateDirPath != false ) ){
$result = 'true';
}
return $resul开发者_Go百科t;
I have that fxn and outertemplate is equal to $_SERVER['DOCUMENT_ROOT' ] . 'mysite.com/templates/admin/structure/outertemplate/
.
but it returns with an error saying:
Warning: opendir(1) [function.opendir]: failed to open dir: No such file or directory in C:\wamp\www\mysite.com\templates\admin\structure\structure.php on line 411
what seems to be the problem? what should be
Your parentheses seem misplaced. You are passing a boolean (the return value of comparing the template directory to false) to opendir() instead of the directory.
if (opendir($this->OuterTemplateDirPath) != false) {
精彩评论