开发者

PHP opendir( ) function problem

开发者 https://www.devze.com 2023-01-24 18:04 出处:网络
$result = \'false\'; if( opendir( $this->OuterTemplateDirPath != false ) ){ $result = \'true\'; } return $resul开发者_Go百科t;
$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) { 
0

精彩评论

暂无评论...
验证码 换一张
取 消