curl_setopt($ch, CURLOPT_COOKIESESSION, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'logs/cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEJAR, 'logs/cookie.txt');
<?php
set_time_limit(0);
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
include("config.php");
class script {
/**/
}
$object = new Script($DSN, $DB, $DB_PASS, $OPTIONS);
if (!file_exists(__DIR__ . '/lock_file.lock')) {
touch(__DIR__ . '/lock_file.lock');
} else {
exit('test');
}
<?php
$array1 = ['Id' => '1', 'ServiceName' => 'Test', 'ServiceStatus' => '1', 'ServiceId' => '307'];
$array2 = ['Id' => '100593', 'ServiceId' => '307', 'StatusId' => '4'];
foreach ($array1 as $service) {
foreach ($array2 as $order) {
if ($service['ServiceId'] == $order['ServiceId']) {
echo "Test";
}
}
}
WARNING Illegal string offset 'ServiceId' on line number 10
array(1) { [0]=> array(5) { ["ServiceId"]=> string(6) "183014" ["ServiceName"]=> string(15) "Test" ["ServiceStatusId"]=> string(1) "5" } }
serviceId
$result = $query->fetchAll(PDO::FETCH_ASSOC);