2024-05-20 14:40:53 +03:00
|
|
|
<?php
|
2024-05-21 11:53:40 +03:00
|
|
|
|
|
|
|
namespace src;
|
|
|
|
|
|
|
|
use Information;
|
|
|
|
|
|
|
|
require_once "src/Information.php";
|
2024-05-20 15:11:17 +03:00
|
|
|
|
2024-05-21 17:06:42 +03:00
|
|
|
$fileName = "Information.txt";
|
|
|
|
$fileModeOpen = "a";
|
2024-05-20 15:11:17 +03:00
|
|
|
|
2024-05-21 17:06:42 +03:00
|
|
|
$fullInformation = new Information();
|
|
|
|
$fullInformation->load($_REQUEST);
|
2024-05-20 15:11:17 +03:00
|
|
|
|
2024-05-21 17:06:42 +03:00
|
|
|
echo "<pre>";
|
|
|
|
print_r($fullInformation);
|
|
|
|
$string = $fullInformation->toString();
|
2024-05-20 15:11:17 +03:00
|
|
|
|
2024-05-21 17:06:42 +03:00
|
|
|
$file = fopen($fileName, $fileModeOpen);
|
|
|
|
fwrite($file, $string);
|
2024-05-21 11:53:40 +03:00
|
|
|
fclose($file);
|
2024-05-21 17:06:42 +03:00
|
|
|
|
2024-05-22 14:29:38 +03:00
|
|
|
$file = file($fileName);
|
|
|
|
$str = new Information();
|
|
|
|
$res = $str->search($file, "Зайцев");
|
|
|
|
|
|
|
|
echo $res;
|
|
|
|
|
2024-05-21 11:53:40 +03:00
|
|
|
require "table.php";
|