如何删除课程中的文件?

时间:2014-05-28 09:19:30

标签: php html5 class gallery crud

我想在我的画廊上进行CRUD管理,但我不知道如何。我在互联网上搜索过但我找不到我要找的东西。

这是我的班级:

    class Gallery {
public function renderImages($map)
{
    $images = "";

    foreach (glob($map ."*.{jpeg,jpg,png,gif}", GLOB_BRACE) as $image){
        $images .= "<a href='".$image."' data-lightbox='afbeelding'><img src='".$image."' class='thumbnail'></img></a>";
    }

    return $images;
}

}

这是我的画廊:

    <div class="gallery">
    <center>
    <a href="index.php">Back:</a>
        <style>
            body
            {
                margin:0;
                padding:0;
                background:#efefef;
                font-family: "Helvetica Neue", helvetica, arial, sans-serif;
                color: black;
                text-align:center; /* used to center div in IE */
            }



        </style>
        <?php

        $gallery = new Gallery();
        echo $gallery -> renderImages("../images/");


        $connection = new DatabaseConnection();
        $render = new RenderData();
        $page = 1;


        if(isset($_GET['page'])) {
            $check = new CheckData();

            if($check->PageCheck($_GET['page'])) {
                $page = $_GET['page'];
            }
        }
        ?>
<table>
    <div id="Intro">
        <tr>
            <td>Hieronder kan je uploaden.</td>
        </tr>
    </div>
    <tr>
        <td>Max. 500000000Bytes</td>
    </tr>
    <tr>
        <form action="pages/upload_file.php" method="post" enctype="multipart/form-data">
            <td><label for="file">Filename:</label></td>
    </tr>
    <tr>
        <td><input type="file" name="file" id="file"></td>
    </tr>
    <tr>
        <td><input type="submit" name="submit" value="Submit"></td>
    </tr>
    <tr>
        <td><input type="submit" name="delete" value="Delete"></td>
    </tr>
    </form>
</table>

如何对此进行CRUD管理? 我想选择照片,然后从我的电脑中删除它。

我希望你们能帮助我......

0 个答案:

没有答案