0
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
<?php 
foreach($css_files as $file): ?>
    <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>
<?php foreach($js_files as $file): ?>
    <script src="<?php echo $file; ?>"></script>
<?php endforeach; ?>
<style type='text/css'>
body
{
    font-family: Arial;
    font-size: 14px;
}
a {
    color: blue;
    text-decoration: none;
    font-size: 14px;
}
a:hover
{
    text-decoration: underline;
}
</style>
</head>
<body>
    <div>
        <a href='<?php echo base_url?>images_examples/example1'>Example 1 - Simple</a> |
        <a href='<?php echo base_url?>images_examples/example2'>Example 2 - Ordering</a> |
        <a href='<?php echo base_url?>images_examples/example3'>Example 3 - With group id</a>
    </div>
    <div style='height:20px;'></div>  
    <div>
        <?php echo $output; ?>
    </div>
</body>
</html>

在这里我上传视图文件。但我无法编写控制器功能。我想如何安装 image_crud 库以及如何在数据库中上传多个图像并将图像存储在文件夹中。

4

1 回答 1

2

下载image-crud然后解压包

将文件放在适当的 codeigniter 文件夹中

配置 >> image_crud.php

控制器 >> images_examples.php

库 >> image_crud.php, image_moo.php

视图 >> example.php

CI 文件夹根目录中的资产

在你的网址http://yourproject.localhost/images_examples/example1

同时导入包中提供的示例数据库

于 2013-07-26T11:12:13.483 回答