- vk.com\n.osennij
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" | |
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
<link rel="stylesheet" href="./slimbox/slimbox2.css"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Article; | |
use App\Http\Requests\ArticleRequest; | |
use Carbon\Carbon; | |
use Illuminate\Http\Request; | |
use \Auth; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bibliography et-al-min="4" et-al-use-first="1"> | |
... | |
<group delimiter=" / "> | |
<text macro="author"/> | |
<text variable="title"/> | |
<text macro="author"/> | |
</group> | |
<macro name="author"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Контроллер** | |
public function actionViewAll($order='Пусто') | |
{ | |
echo $order; | |
} | |
**config/web.php** | |
'request' => [ | |
'cookieValidationKey' => '.....', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { | |
$db_hostname = 'localhost'; | |
$db_database = 'lg4'; | |
$db_username = $_SERVER['PHP_AUTH_USER']; | |
$db_password = $_SERVER['PHP_AUTH_PW']; | |
mysqli_report(MYSQLI_REPORT_STRICT); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
\---test | |
| \---1.html | |
| \---2.html | |
| \---3.html | |
|---этот файл.php | |
*/ | |
$dir='test'; //Папка, где лежат файлы. Примерная структура представлена выше. | |
$filelist = glob($dir."/*.html"); //Ищет все файл с расширением html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="fh5co-subscribe"> | |
<div class="col-md-8 col-md-offset-2 fh5co-section-heading text-center"> | |
<h2 class="fh5co-lead animate-single product-animate-1"><font color="white">Для консультации или заказа услуг, заполните форму</font></h2> | |
</div> | |
<div class="container"> | |
<div class="row animate-box"> | |
<form action="test3.php" method="post"> | |
<div class="col-md-3 col-sm-3"> | |
<div class="form-group"> | |
<input type="text" class="form-control" name="name" placeholder="Имя"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(preg_match('/[.](jpg)|(JPG)|(JPEG)|(jpeg)$/', $_FILES['element_11']['name'])) { //Тут и дальше element_11 - это name input type=file | |
$path_to_image_directory=''; //имя папки для хранения загруденных фото на сервере с указанием пути | |
$filename=$_FILES['element_11']['name']; //имя файла | |
$source = $_FILES['element_11']['tmp_name']; //путь до файла во временном хранлище | |
$filename=date('Y-m-d-H-m-s')."-r".rand(100,999)."-".".jpg"; //даём файлу рандомное имя, используя дату и время текущие + рандомный номер. | |
$target = $path_to_image_directory . $filename; //создаём место, где будет храниться фото и с каким именем | |
move_uploaded_file($source, $target); //перпемещаем фотографию. Теперь фотография доступна по пути $target | |
} else { | |
echo "Недопустимый файла для загрузки"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST['element_1_1']) && !empty($_POST['element_1_1']) && isset($_POST['element_2']) && !empty($_POST['element_2'])) { //Проверка отправилось ли наше поля name и не пустые ли они | |
$to = 'voron_@mail.ru'; //Почта получателя, через запятую можно указать сколько угодно адресов | |
$subject = 'Anketa apartamentov'; //Загаловок сообщения | |
/*Получаем фото. Проверяем, чтобы было допустимое расширение файла. С размеров файла - это отдельная морока. Сохраняем фото на сервере у себя в отедульную папку. | |
Поскольку при отпрвке файлы (и фото) идут в temp, то и путь до фото будет путь\name.tmp. B его не отправишь. | |
Может как-то и можно, но я делал только так. | |
*/ | |
if(preg_match('/[.](jpg)|(JPG)|(JPEG)|(jpeg)$/', $_FILES['element_11']['name'])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if(isset($_POST['login']) && filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) && isset($_POST['password']) && !empty($_POST['login']) && !empty($_POST['email']) && !empty($_POST['password'])){ | |
$login = trim($_POST['login']); //trim удлаяет пробелы в начале и концe | |
$email = trim($_POST['email']); | |
$pass = trim($_POST['password']); | |
setcookie('username', $login, time()+3600*24*30, '/'); |
NewerOlder