ユーザ用ツール

サイト用ツール

Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/5/58325695903c96837582b32e32cf52bc.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/5/58325695903c96837582b32e32cf52bc.metadata failed

phpフォルダ削除
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/5/58325695903c96837582b32e32cf52bc.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/5/58325695903c96837582b32e32cf52bc.xhtml failed

パスの最後文字削除

$imageDir = substr($imageDir, 0, -1);

削除ファンクション起動

self::unlinkRecursive($imageDir, true);
	/**
	* Recursively delete a directory
	*
	* @param string $dir Directory name
	* @param boolean $deleteRootToo Delete specified top-level directory as well
	* $dirは消去したい一番上のディレクトリ
	*  $deleteRootTooは一番上のディレクトリを消去したい場合にtrueを設定
	*/
	public static function unlinkRecursive($dir, $deleteRootToo)
	{
		if(!$dh = @opendir($dir)){
			return;
		}
		
		while (false !== ($obj = readdir($dh)))
		{
			if($obj == '.' || $obj == '..'){
			    continue;
			 }  

			if (!@unlink($dir . '/' . $obj)){
			   unlinkRecursive($dir.'/'.$obj, true);
			}
		}

		closedir($dh);

		if ($deleteRootToo){
			@rmdir($dir);
		}
		return;
	}
phpフォルダ削除.txt · 最終更新: 2014/03/10 13:25 by luis_lee