This commit is contained in:
Krivchikov Dmitry 2015-08-29 15:14:04 +03:00
parent 1b9c8aa2df
commit 1f5da44e74
4 changed files with 16 additions and 1 deletions

2
.gitignore vendored
View File

@ -20,3 +20,5 @@ public/photos/big/*.jpg
public/photos/big/*.jpeg
public/photos/big/*.png
public/photos/big/*.gif
logs/*.log

View File

@ -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
);
}
}

View File

@ -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);

0
logs/.gitKeep Normal file
View File