|
@@ -17,16 +17,24 @@ class crash_logControl extends mobileHomeControl
|
|
|
$crash_content = $_POST['content'];
|
|
|
if (!empty($crash_content)) {
|
|
|
|
|
|
- $version = $_GET['version'];
|
|
|
- if (!empty($version)) {
|
|
|
- $path = BASE_DATA_PATH . '/log/' . $version . '/';
|
|
|
+ $platform = $_GET['platform'];
|
|
|
+ if (!empty($platform)) {
|
|
|
+ $path = BASE_DATA_PATH . '/log/' . $platform . '/';
|
|
|
} else {
|
|
|
$path = BASE_DATA_PATH . '/log/default/';
|
|
|
}
|
|
|
- if (!is_dir($path)) {
|
|
|
- mkdir($path);
|
|
|
+
|
|
|
+ if (!is_dir($path)) mkdir($path);
|
|
|
+
|
|
|
+ $version = $_GET['version'];
|
|
|
+ if (!empty($version)) {
|
|
|
+ $path = $path . $version . '/';
|
|
|
+ } else {
|
|
|
+ $path = $path . 'default/';
|
|
|
}
|
|
|
|
|
|
+ if (!is_dir($path)) mkdir($path);
|
|
|
+
|
|
|
$file_name = date('Ymd', TIMESTAMP) . '-' . random(4) . '.crash.log';
|
|
|
|
|
|
file_put_contents($path . $file_name, $crash_content, FILE_APPEND);
|