我收到这样的错误
致命错误:在不在对象上下文中时使用$ this 第243行的C:\ xampp \ htdocs \ public_html \ cjls \ check.php
母鸡我试图获取mime类型的文件,如果有任何想法我怎么能解决这个问题
<?php
$folderinfo = "filepath/filename.php";
$folderinfo = pathinfo($folderinfo);
$basename = $folderinfo['basename'];
$ext = $folderinfo['extension'];
$mimeTypes = array(
"323" => "text/h323",
"zip" => "application/zip"
);
$mime = isset($this->mime_types[$ext]) ? $this->mime_types[$ext] : "application/octet-stream";
echo $mime;
?>