body {margin:0;}
* {
box-sizing: border-box;
}
.box {
width:50%;
background-color:coral;
}
.box-img {
width:100%;
display:block;
}
.box-header {
width:100%;
text-align:center;
font-size:28px;
line-height:28px;
background-color:red;
margin:0;
}
.box-text {
width:100%;
text-align:center;
font-size:16px;
line-height:16px;
background-color:red;
margin:0;
}
$str = file_get_contents('https://www.rbc.ru');
$html = htmlspecialchars($str);
echo $html;
function sendForm(){
$.ajax({
url: 'form.php',
type: 'POST',
data: {
fio: $('form input').val();
},
success: function(response) {
$('#result').html(response);
}
});
}
// form.php
$data = file('user.txt', FILE_IGNORE_NEW_LINES);
if (in_array($_POST['fio'], $data)){
echo 'Yes';
}
else {
echo 'No';
}
// user.txt
Лердорф Расмус
Эйх Брендан
Тим Бернерс-Ли
Хокон Виум Ли
$('.js-tab-trigger').click(function() {
var id = $(this).attr('data-tab'),
content = $('.js-tab-content[data-tab="'+ id +'"]');
$('.js-tab-trigger').addClass('active');
$(this).removeClass('active');
$('.js-tab-content').addClass('active');
content.removeClass('active');
});
AddType application/octet-stream .txt
<Files *.txt>
ForceType application/octet-stream
Header set Content-Disposition attachment
</Files>
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L]
.text {
font: normal normal 13px Open Sans;
line-height: 1.7;
}
if (isset($_GET['utm_source'])){
$url_add = '?utm_source='.$_GET['utm_source'];
}
else {
$url_add = false;
}
<a href="http://2example.com/order<?= $url_add?>">Купить</a>