Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
一些html标记';参数包括html/php代码_Php_Html - Fatal编程技术网

一些html标记';参数包括html/php代码

一些html标记';参数包括html/php代码,php,html,Php,Html,当我在我的网站上创建/编辑帖子时,当我使用html标记时(要么自己键入,要么使用WYSIWYG编辑器(在本例中为nicEdit,但我使用了不同的一个-相同的问题))页面上不会显示任何内容 更具体地说:我有article容器,它导入php代码,然后遍历db表和echoposts。代码如下: <h3>Wydarzenia</h3> <?php //collects data from table "events" and sort it by "id" date

当我在我的网站上创建/编辑帖子时,当我使用html标记时(要么自己键入,要么使用WYSIWYG编辑器(在本例中为nicEdit,但我使用了不同的一个-相同的问题))页面上不会显示任何内容

更具体地说:我有
article
容器,它导入php代码,然后遍历db表和
echo
posts。代码如下:

<h3>Wydarzenia</h3>
<?php
    //collects data from table "events" and sort it by "id" date in descending oreder
    $event_table_data = mysqli_query($db_con, "SELECT * FROM events ORDER BY id DESC") 
        or die(mysqli_error());

    //puts the data from "events" into an array
    $event_content_array = mysqli_fetch_array($event_table_data); 

    //makes variables from table columns
    $id = id;
    $title = title;
    $happeninng_date = happen;
    $created_date = created;
    $content = content;
    $author = author;

    //add new post button
    if((isset($_SESSION['sess_wizardrights'])) && ($_SESSION['sess_wizardrights'] == true)){
        echo    "<a class='e_event_addpost_link' href='./index.php?link=add_post'><button  class='e_event_addpost_button' type='button'>Dodaj nowy post</button></a>";
    }

    do{
        //echo each event for main event article
        echo    "<span class='b_events_span' id='" . $event_content_array[$id] . "'>";
        echo    "   <a class='b_events_anchor' id='" . $event_content_array[$id] . "'></a>";
        echo    "   <h2 class='b_events_title'>" . $event_content_array[$title] . "</h2>";
        if((isset($_SESSION['sess_wizardrights'])) && ($_SESSION['sess_wizardrights'] == true)){
            echo    "<form class='b_events_edit_form' name='edit_post' action='./index.php?link=edit_post' method='post'>";
            echo    "   <input type='hidden' name='id' value='" . $event_content_array[$id] . "'> ";
            echo    "   <input class='e_events_edit_submit' type='submit' value='Edytuj wydarzenie'>";
            echo    "</form>";
        }
        echo    "   <div class='fb-share-button' data-href='http://www.zhppgkaberdeen.co.uk/index.php?link=events#" . $event_content_array[$id] . "'></div>";
        echo    "   <p class='b_events_happening_date'><i>Data wydarzenia: " . $event_content_array[$happeninng_date] . "</i></p>";
        echo    "   <p class='b_events_content'>" . $event_content_array[$content] . "</p>";
        echo    "   <p class='b_events_created_date'>Utworzono: " . $event_content_array[$created_date] . "</p>";
        echo    "   <p class='b_events_author'><b>Czuwaj!</b><br/>" . $event_content_array[$author] . "</p>";
        echo    "</span>";

    }while($event_content_array = mysqli_fetch_array( $event_table_data ));
?>
Wydarzenia

如果您正在使用例如
echo“”尝试转义
”,例如
alt=\“text\”

Firebug等会清理输出。请在浏览器中使用view source。您应该研究转义以及“and”的正确使用。我发现,我在主要文章之前有一个类似的面板,它也包含相同的内容。它将文章移动到导航面板中,导航面板是每篇文章的预览。我会努力的我发现了问题所在。我想在帖子预览面板中添加strip_标记,因为它占用了帖子内容字符串的一部分,并删除了一些结束标记。