$(document).on('click', '.add_answer', function (e) {
let trs = $('#question_type_1 [class^=answer_number_]:last-child').attr('class');
trs = trs.replace('answer_number_','');
//console.log(trs);
trs *= 1; trs += 1;
$('#question_type_1 tbody').append(
'<tr class="answer_number_' + trs + '">'+
'<td>' + trs +'</td>'+
'<td>'+
' <input class="form-control" type="text" name="answer' + trs + '">'+
'</td>'+
'<td>'+
' <span class="badge badge-secondary">True</span>'+
' <span class="badge badge-danger active">False</span>'+
' <span class="badge badge-success add_answer pl-2 pr-2">+</span>'+
' <span class="badge badge-danger del_answer pl-2 pr-2">-</span>'+
'</td>'+
'</tr>'
);
return false;
});
{!! app('captcha')->display($attributes = [], $options = ['lang'=> 'ru']) !!}
'g-recaptcha-response' => 'required|captcha'
sc.exe query vboxdrv
sfc /scannow
$connect_to_db = mysql_connect($db_host, $db_username, $db_password) or die("Could not connect: " . mysql_error());
$connect_to_db
### in php.ini
error_reporting = E_ALL
display_errors = On
$('.cool_bg_for_menu_hover').addClass('cool_bg_for_menu_hover_inner').css({'z-index':1002,'top':'60px',});
if ($_SERVER['REQUEST_METHOD'] !== 'POST'{
die('error');
}
foreach ($_POST as $key => $value){
if ($_SERVER['REQUEST_METHOD'] === 'POST'{
if (array_key_exists('id',$_POST)){
// очистка входной переменной
}
}
filter_input(INPUT_POST,'id', FILTER_SANITIZE_NUMBER_INT);
$id = (int) $_POST['id'];
$id = intval( $_POST['id']);
$id = 0; // значение по умолчанию
if (!preg_match("/^[1-9]\d+{1,9}$/")){
die('ошибка');
}else{
$id = $_POST['id'];
<input type="text" name="firstname" value="<?=encode($_POST['firstname']) ?>" required>
public function rules(){
return [
['file', 'file', 'extensions' => 'tar,png, jpg, jpeg, gif, docx, xlsx, pdf, rar, djvu, zip, 7z, txt,', 'maxSize' => Yii::$app->params['fileMaxSize'], 'maxFiles' => 5, 'checkExtensionByMimeType' => false],
[ ['file'], 'required' ],
];
}
var new_params = $( '#simpleFilter' ).serializeArray();
var http_build = '';
for(var i = 0; i < new_params.length; i++) {
//c[new_params[i]['name']] = new_params[i]['value'];
if ( new_params[i]['name'] !== '_csrf' )
http_build += "" + new_params[i]['name'] + "=" + new_params[i]['value'] + "&";
}
var new_path = window.document.location.origin + '/controller/action?' + http_build;
window.location.href = new_path;
$scu = $url . '?' . http_build_query($data);
$opts = array('http' =>
array(
'method' => 'GET',
'max_redirects' => '0',
'ignore_errors' => '1',
)
, 'ssl' => array(
'verify_peer' => true,
'cafile' => '/SRV/php721/extras/ssl/' . "cacert.pem",
'ciphers' => 'HIGH:TLSv1.2:TLSv1.1:TLSv1.0:!SSLv3:!SSLv2',
'CN_match' => $cn_match,
'disable_compression' => true,
)
);
$context = stream_context_create($opts);
$stream = fopen($scu, 'r', false, $context);
// информация о заголовках, а также
// метаданные о потоке
echo Debug::d(stream_get_meta_data($stream),'stream_get_meta_data($stream)');
// актуальная информация по ссылке $url
echo Debug::d(stream_get_contents($stream),'stream_get_contents($stream)');
fclose($stream);