Title: Warning: Cannot modify header information &#8212; headers already sent by
Last modified: 19.10.2017

---

# Warning: Cannot modify header information — headers already sent by

 *  Решено [Ternikov](https://ru.wordpress.org/support/users/ternikov/)
 * (@ternikov)
 * [8 лет, 11 месяцев назад](https://ru.wordpress.org/support/topic/warning-cannot-modify-header-information-headers-already-sent-by-2/)
 * Ошибка:
    Warning: Cannot modify header information — headers already sent by (
   output started at /var/www/site/wp-content/themes/realtor/shortcodes.php:1331)
   in /var/www/site/wp-includes/pluggable.php on line 1210 Ругается на этот кусок
   кода, что с ним не так?:
 *     ```
       <?
       add_shortcode('tt_form_1', 'tt_form_1');
   
       function tt_form_1() { 
       	ob_start();?>
       <section class="offer_1">
       	<div class="container">
       	<div class="row">
       		<div class="col-sm-6">
       			<div class="caption">
       			<h2 style="margin: 15px 0; font-size: 22px"><i class="icon icon-home4" style="margin-right: 10px;"></i>Нужна консультация?</h2>
       			</div>
       		</div>
       		<div class="col-sm-12" style="margin-top: 8px;">
       			<form class="offer_form_1" action="/mail.php" method="POST">
       				<div class="col-sm-6 brd_cont">
       					<div class="brd"></div>
       					<input name="name" required="" type="text" placeholder="Ваше имя" />
       				</div>
       				<div class="col-sm-6 brd_cont">
       					<div class="brd"></div>
       					<input name="phone" required="" type="text" placeholder="Ваш телефон" />
       				</div>			
       				<div class="col-sm-6 brd_cont">
       					<div class="brd"></div>
       					<input name="email" type="email" placeholder="Ваш email" />
       				</div>
       				<div class="col-sm-6 brd_cont">
       					<div class="brd"></div>
       					<input class="offer_1_submit" style="" type="submit" value="Отправить" />
       				</div>				
       			</form>
       		</div>
               <div class="col-sm-6" style="margin-top: 2px; font-size: 12px; color: #fff;">
                   Нажимая на кнопку, вы даете согласие на обработку своих персональных данных и соглашаетесь c <a data-toggle="modal" data-target="#callModal_rules" style="color:white; text-decoration: underline; cursor: pointer ;">политикой конфиденциальности</a>
               </div>
       	</div>
       	</div>
   
   
       </section>	
   
   
       <? return ob_get_clean(); } ?>
       ```
   

Просмотр 3 ответов — с 1 по 3 (всего 3)

 *  Модератор [Sergey Biryukov](https://ru.wordpress.org/support/users/sergeybiryukov/)
 * (@sergeybiryukov)
 * Live and Learn
 * [8 лет, 11 месяцев назад](https://ru.wordpress.org/support/topic/warning-cannot-modify-header-information-headers-already-sent-by-2/#post-262305)
 * С этим куском всё так, но до или после него есть пустая строка или пробел между`?
   >` и `<?php`.
 *  Автор [Ternikov](https://ru.wordpress.org/support/users/ternikov/)
 * (@ternikov)
 * [8 лет, 11 месяцев назад](https://ru.wordpress.org/support/topic/warning-cannot-modify-header-information-headers-already-sent-by-2/#post-262306)
 * Спасибо
 *  [SeVlad](https://ru.wordpress.org/support/users/sevlad/)
 * (@sevlad)
 * [8 лет, 11 месяцев назад](https://ru.wordpress.org/support/topic/warning-cannot-modify-header-information-headers-already-sent-by-2/#post-262330)
 * И если хотите, что бы всё работало везде и всегда, привыкните делать правильно:
   не `<?` а `<?php`.

Просмотр 3 ответов — с 1 по 3 (всего 3)

 Тема «Warning: Cannot modify header information — headers already sent by» закрыта
для новых ответов.

 * Форум: [Проблемы и решения](https://ru.wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 ответа
 * 3 участника
 * Последний ответ: [SeVlad](https://ru.wordpress.org/support/users/sevlad/)
 * Последняя активность: [8 лет, 11 месяцев назад](https://ru.wordpress.org/support/topic/warning-cannot-modify-header-information-headers-already-sent-by-2/#post-262330)
 * Статус: решённая

## Темы

### Самые популярные темы

### Темы без ответов

### Без вопроса

### Решённые

### Нерешённые

### Все темы
