mirror of
https://github.com/ledccn/IYUUPlus.git
synced 2024-09-20 07:05:28 +00:00
fixed
This commit is contained in:
parent
66b7f45e52
commit
668aef26f8
|
@ -33,15 +33,17 @@ class Config
|
|||
clearstatcache();
|
||||
$file_name = $absolutePath ? $filename : static::createFilePath($filename, $type);
|
||||
|
||||
if (!is_writable(dirname($file_name))) {
|
||||
$dir = dirname($file_name);
|
||||
is_dir($dir) or mkdir($dir, 0777, true);
|
||||
if (!is_writable($dir)) {
|
||||
return false;
|
||||
}
|
||||
if (file_exists($file_name)) {
|
||||
|
||||
if (!file_exists($file_name)) {
|
||||
touch($file_name);
|
||||
chmod($file_name, 0777);
|
||||
} else {
|
||||
$dir = dirname($file_name);
|
||||
is_dir($dir) or mkdir($dir, 0777, true);
|
||||
}
|
||||
|
||||
switch (strtolower($type)) {
|
||||
case 'object':
|
||||
$str = serialize($data);
|
||||
|
|
Loading…
Reference in New Issue
Block a user