Всем привет, у меня такая проблема, что в php файле сами генерируются теги a, то есть в самом коде нет этих тегов, но через просмотр инспектора они появляются, кто-нибудь сталкивался с такой проблемой?
Вот код хедера
<?php
session_start();
require_once "config/Settings.php";
$connection = new PDO('mysql:host=' . \Settings::$db_host . ';dbname=' . \Settings::$db_name, \Settings::$db_user, \Settings::$db_password);
if(isset($_SESSION["authorization"])) {
\App\Controllers\UserController::loadUserData($connection, $_SESSION["user"]["id"]);
}
?>
<link rel="stylesheet" href="resources/assets/css/header_style.css">
<div class="wrapper">
<header>
<div class="navbar">
<div class="logo">
<img src="resources/assets/img/logos/logo.png">
</div>
<h1 class="header"><?php echo Settings::$SITE_NAME ?></h1>
<div class="navbar-menu">
<ul>
<a href="<?php echo Settings::$SITE_URL ?>" class="navbar-element"><li>Главная</li></a>
<a href="<?php echo Settings::$SITE_URL ?>products" class="navbar-element"><li>Товары</li></a>
<a href="<?php echo Settings::$SITE_URL ?>" class="navbar-element"><li>Вконтакте</li></a>
<a href="<?php echo Settings::$SITE_URL ?>reviews" class="navbar-element"><li>Отзывы</li></a>
</ul>
</div>
<div class="user-menu">
<div class="dropdowm">
<div>
<a href="#" class="drop-btn">
<img onclick="showDropMenu()" src="resources/assets/img/icons/account.png" class="user-logo">
</a>
</div>
<div id="myDropdown" class="dropdown-content">
<?php
if(empty($_SESSION["user"])) {
echo '<a class="drop-link" href="' . Settings::$SITE_URL . 'register">Регистрация<a/>';
echo '<a class="drop-link" href="' . Settings::$SITE_URL . 'login">Войти<a/>';
} elseif(!empty($_SESSION["user"])) {
echo '<a class="drop-link" href="' . Settings::$SITE_URL . 'profile">Профиль</a>';
echo '<a class="drop-link" >Баланс: ' . $_SESSION["user"]["balance"] . '₽</a>';
echo '<a class="drop-link" href="' . Settings::$SITE_URL . 'account/settings">Настройки</a>';
echo '<a class="drop-link" href="' . Settings::$SITE_URL . 'account/logout">Выйти</a>';
echo '<a></a>';
}
?>
</div>
</div>
</div>
</header>
</div>
<!--<script src="resources/assets/js/jquery.js"></script>-->
<script src="resources/assets/js/dropdownMenu.js"></script>
Вот код основной страницы
<?php ob_start() ?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="resources/assets/css/register_style.css">
<title>Document</title>
</head>
<body>
<?php
require_once __DIR__ . "/../components/header.php";
require_once __DIR__ . "/../../config/Settings.php";
if(!empty($_SESSION["user"])) header("Location: " . Settings::$SITE_URL . "profile");
use App\Controllers\UserController;
?>
<section>
<div class="container">
<div class="base-container">
<div class="register-container">
<form action="reg" method="post">
<input type="hidden" name="ip" class="ip-input" value="<?php echo $_SERVER["REMOTE_ADDR"] ?>">
<input type="text" name="login" class="login" placeholder="Логин" required>
<input type="password" name="password" class="password" placeholder="Пароль" required>
<input type="password" name="repassword" class="repassword" placeholder="Повтор пароля" required>
<input type="email" name="email" class="email" placeholder="Email" required>
<button>Зарегистрироваться</button>
</form>
</div>
<p class="registered">Уже зарегистрированы? <a href="<?php Settings::$SITE_URL ?>login">Войти</a></p>
</div>
<?php
if(isset($_SESSION["errors"]["registration-message"])) {
echo $_SESSION["errors"]["registration-message"];
unset($_SESSION["errors"]["registration-message"]);
}
?>
</div>
</section>
<?php require_once __DIR__ . "/../components/footer.php"; ?>
</body>
</html>
Вот скрин инспектора