ADD Logs
This commit is contained in:
parent
1b9c8aa2df
commit
1f5da44e74
|
|
@ -20,3 +20,5 @@ public/photos/big/*.jpg
|
|||
public/photos/big/*.jpeg
|
||||
public/photos/big/*.png
|
||||
public/photos/big/*.gif
|
||||
|
||||
logs/*.log
|
||||
|
|
@ -205,4 +205,17 @@ class App
|
|||
);
|
||||
}
|
||||
|
||||
public static function log($logName, $value)
|
||||
{
|
||||
$fileName = App::getBasedir() .
|
||||
'logs/' .
|
||||
$logName . '.log';
|
||||
|
||||
return file_put_contents(
|
||||
$fileName, date('d-m-Y H:i:s') . " - " .
|
||||
print_r($value, true) .
|
||||
"\n-------------------\n", FILE_APPEND
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ class JsonController extends Controller
|
|||
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
$out = null;
|
||||
$out = curl_exec($ch); // выполняем запрос curl - обращаемся к сервера php.su
|
||||
$out = curl_exec($ch);
|
||||
|
||||
if (!empty($out)) {
|
||||
$obj = simplexml_load_string($out);
|
||||
|
|
|
|||
Loading…
Reference in New Issue