Гуглил - пишут что ошибка из-за того, что символы перед кодом php стоят, но у меня там идет html код.
Причем, на ноутбуке сайт работает нормально, а на компьютере выдает такие ошибки. Почему так? Как исправить?
"Код ошибки на 1 странице" (Отобразить)
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at Z:\home\localhost\www\26 Antibot\Mail.php:31) in Z:\home\localhost\www\26 Antibot\Mail.php on line 51
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at Z:\home\localhost\www\26 Antibot\Mail.php:31) in Z:\home\localhost\www\26 Antibot\Mail.php on line 51
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at Z:\home\localhost\www\26 Antibot\Mail.php:31) in Z:\home\localhost\www\26 Antibot\Mail.php on line 51
"Код ошибки на 2 странице" (Отобразить)
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at Z:\home\localhost\www\26 Antibot\Sent.php:8) in Z:\home\localhost\www\26 Antibot\Sent.php on line 16
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at Z:\home\localhost\www\26 Antibot\Sent.php:8) in Z:\home\localhost\www\26 Antibot\Sent.php on line 16
Warning: Cannot modify header information - headers already sent by (output started at Z:\home\localhost\www\26 Antibot\Sent.php:8) in Z:\home\localhost\www\26 Antibot\Sent.php on line 35
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at Z:\home\localhost\www\26 Antibot\Sent.php:8) in Z:\home\localhost\www\26 Antibot\Sent.php on line 16
Warning: Cannot modify header information - headers already sent by (output started at Z:\home\localhost\www\26 Antibot\Sent.php:8) in Z:\home\localhost\www\26 Antibot\Sent.php on line 35
"Страница 1" (Отобразить)
CODE (htmlphp):
скопировать код в буфер обмена
скопировать код в буфер обмена
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <link rel="stylesheet" type="text/css" href="Style.css">
- </head>
- <body>
- <form method="post" action="Sent.php">
- <div class="main">
- <div class="field">
- <label for="theme">Тема письма:</label>
- <input type="text" name="theme">
- </div>
- <div class="field">
- <label for="name">Ваше имя:</label>
- <input type="text" name="name">
- </div>
- <div class="field">
- <label for="ail">Ваш е-мейл:</label>
- <input type="text" name="ail">
- </div>
- <div class="field">
- <label for="phone">Ваш телефон:</label>
- <input type="text" name="phone">
- </div>
- <div class="field">
- <textarea name="message" placeholder="Введите сообщение..."></textarea>
- </div>
- <div class="field">
- <label for="captcha">
- <?php
- $rand1 = mt_rand(0, 100);
- $rand2 = mt_rand(0, 100);
- $sum = $rand1 + $rand1;
- echo $rand1 . " + " . $rand2 . " = ";
- $_POST["rand1"] = $rand1;
- $_POST["rand2"] = $rand2;
- ?>
- </label>
- <input type="hidden" name="sum" value="<?php echo $sum; ?>">
- <input type="hidden" name="rand1" value="<?php echo $rand1; ?>">
- <input type="hidden" name="rand2" value="<?php echo $rand2; ?>">
- <input type="text" name="captcha" placeholder="Ответ...">
- </div>
- <div class="field">
- <input type="submit" value="Отправить письмо">
- </div>
- </div>
- </form>
- <?php
- if (!empty($_SESSION["theme"])) {
- echo "<div class='after'>" . $_SESSION["theme"] . "<div>";
- unset($_SESSION["theme"]);
- }
- if (!empty($_SESSION["name"])) {
- echo "<div class='after'>" . $_SESSION["name"] . "<div>";
- unset($_SESSION["name"]);
- }
- if (!empty($_SESSION["ail"])) {
- echo "<div class='after'>" . $_SESSION["ail"] . "<div>";
- unset($_SESSION["ail"]);
- }
- if (!empty($_SESSION["message"])) {
- echo "<div class='after'>" . $_SESSION["message"] . "<div>";
- unset($_SESSION["message"]);
- }
- ?>
- </body>
- </html>