Při vykonávání scriptu mi to napíše tuto chybu:
Warning: Cannot modify header information - headers already sent by (output started at /home/users/ntsrvbl0104/public_html/tiny_mce/script.js:35) in /home/users/ntsrvbl0104/public_html/admin/aktuality_add.php on line 44
prošel jsem si několik diskuzí a našel jsem, že nesmí být v html žádné mezery nebo komentáře, tak jsem všechny smazal, ale stále mi to tuto chybu hlásí ...
zde je kód aktuality_add.php
<?php
include("../tiny_mce/script.js");
$povinne = array("aktualita" => "aktualita");
?>
<div id="content_2">
<table class="forum" style="width:100%" border="1" cellpadding="0" cellspacing="1">
<tr>
<td class="headb" colspan="3">Přidat aktualitu</td>
</tr>
<tr>
<td class="centerb"> <br />
<?php if(!$_COOKIE['login']) die("Nejste přihlášen!!!");
right_hlavni_spravce();
?><h2>Nová aktualita</h2><br />
<form action="" name="form" method="post">
<table border="0" style="background:#E1E1E1;width:100%">
<?php
if(isset($_POST['sent'])) {
$nevyplnene = nevyplnene($povinne);
if($nevyplnene) {
echo "<div class='error_box'><b>Vyplňte prosím tyto pole: ".implode(", ", $nevyplnene)."</b></div>";
}}
?>
<tr>
<td width="500px">
<textarea name="aktualita" style="width: 100%"></textarea></td>
</tr>
<tr><td><br /><br />
<input type="hidden" name="login" value="<?echo $_COOKIE['login'];?>">
<input type="hidden" name="sent" value="1">
<input type="submit" value="Přidat aktualitu">
<input type="reset"></td>
</tr>
</table>
</form></td>
</tr>
</table>
</div>
<?php
if(isset($_POST['sent'])) {
$id_autora = iduser($_COOKIE['login']);
if(!$nevyplnene) {
$dotaz2 = mysqli_query($spojeni, "INSERT INTO aktuality (autor, aktualita, datum) VALUES ($id_autora, '{$_POST['aktualita']}',CURRENT_TIMESTAMP())");
if($dotaz2) header("Location: index.php?strana=aktuality");
else echo "Nastala chyba, aktualita nebyla přidána!!";
}}
?>
a tady je ještě script.js - nevím jeslti s tím nějak souvisí, ale v chybě je zobrazen:
<script type="text/javascript" src="../tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
language: "cs",
mode : "textareas",
theme : "advanced",
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,visualblocks",
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
content_css : "css/content.css",
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
style_formats : [
{title : 'Bold text', inline : 'b'},
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
{title : 'Example 1', inline : 'span', classes : 'example1'},
{title : 'Example 2', inline : 'span', classes : 'example2'},
{title : 'Table styles'},
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
],
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
nevíte někdo, kde by mohla být chyba? Děkuji za pomoc