本文整理匯總了PHP中file_storage::can_convert_documents方法的典型用法代碼示例。如果您正苦於以下問題:PHP file_storage::can_convert_documents方法的具體用法?PHP file_storage::can_convert_documents怎麽用?PHP file_storage::can_convert_documents使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類file_storage
的用法示例。
在下文中一共展示了file_storage::can_convert_documents方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: test_unoconv_path
/**
* Check if unoconv configured path is correct and working.
*
* @return \stdClass an object with the test status and the UNOCONVPATH_ constant message.
*/
public static function test_unoconv_path()
{
global $CFG;
$unoconvpath = $CFG->pathtounoconv;
$ret = new \stdClass();
$ret->status = self::UNOCONVPATH_OK;
$ret->message = null;
if (empty($unoconvpath)) {
$ret->status = self::UNOCONVPATH_EMPTY;
return $ret;
}
if (!file_exists($unoconvpath)) {
$ret->status = self::UNOCONVPATH_DOESNOTEXIST;
return $ret;
}
if (is_dir($unoconvpath)) {
$ret->status = self::UNOCONVPATH_ISDIR;
return $ret;
}
if (!file_is_executable($unoconvpath)) {
$ret->status = self::UNOCONVPATH_NOTEXECUTABLE;
return $ret;
}
if (!\file_storage::can_convert_documents()) {
$ret->status = self::UNOCONVPATH_VERSIONNOTSUPPORTED;
return $ret;
}
return $ret;
}