mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
#904 autoinstall without ftp
This commit is contained in:
parent
2420ae6abf
commit
683d6c30a9
8 changed files with 253 additions and 8 deletions
|
|
@ -1017,6 +1017,33 @@ class FileHandler
|
|||
$path = self::getRealPath($path);
|
||||
return is_dir($path) ? $path : FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check is writable dir
|
||||
*
|
||||
* @param string $path Target dir path
|
||||
* @return bool
|
||||
*/
|
||||
function isWritableDir($path)
|
||||
{
|
||||
$path = self::getRealPath($path);
|
||||
if(is_dir($path)==FALSE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$checkFile = $path . '/_CheckWritableDir';
|
||||
|
||||
$fp = fopen($checkFile, 'w');
|
||||
if(!is_resource($fp))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
fclose($fp);
|
||||
|
||||
self::removeFile($checkFile);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* End of file FileHandler.class.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue