Php 更改主视图位置编码点火器

Php 更改主视图位置编码点火器,php,codeigniter,templates,Php,Codeigniter,Templates,我对我桌子上的位置有些问题 在这里,您可以看到正在查看的内容: 我的控制器: ?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Manage_products extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model(

我对我桌子上的位置有些问题

在这里,您可以看到正在查看的内容:

我的控制器:

?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Manage_products extends CI_Controller {

public function __construct()
{
    parent::__construct();


    $this->load->model('Products_model');
    $this->load->library('form_validation');
}

public function index()
{
    session_start();

    $this->data['products'] = $this->Products_model->get_all();
    $this->data['title'] = 'Product Management';

    $this->data['message'] = $this->session->flashdata('message');
        $this->load->view('main_view', $this->data);
    $this->load->view('manage_products', $this->data);

}  
查看并管理您的产品 产品 表,td,th { 边框:1px纯绿色; } th { 背景颜色:绿色; 颜色:白色; }

        #infoMessage p{
            padding: .8em;
            margin-bottom: 1em;
            border: 2px solid #ddd;
            background: #FFF6BF;
            color: #817134;
            border-color: #FFD324;
            text-align: center;
        }
        </style>
        </head>
        <body>
        <table width="700" border="0" align="center">
            <tr>
                <td><h2>Parduotuvės </h2></td>
            </tr>
            <tr>
                <td><div id="infoMessage"><?php echo $message;?></div></td>
            </tr>
            <tr>
                <td><input name="New" type="button" value="Pridėti naują" onclick="window.location='product/add'" /></td>
            </tr>
        </table>
        <form name="frmproduct" method="post">
            <input type="hidden" name="rid" />
            <input type="hidden" name="command" />
            <table width="700" align="center">
                <tr>
                    <th width="150"><strong>Parduotuvės pavadinimas</strong></th>
                    <th><strong>Prekės identifikatorius</strong></th>
                    <th><strong>Nuoroda</strong></th>
                    <th><strong>Redaguoti</strong></th>
                    <th><strong>Ištrinti</strong></th>
                </tr>
                <?php
                foreach ($products as $product){
                    $product_id = $product['id'];
                ?>
                    <tr>
                        <td><?php echo $product['pavadinimas'] ?></td>
                        <td><?php echo $product['prekesid'] ?></td>
                        <td><?php echo $product['linkas'] ?></td>
                        <td><a href='product/edit/<?php echo $product_id ?>'>Redaguoti</a></td>
                        <td>
                            <?php 
                                echo anchor('product/delete/'.$product_id, 'Delete', array('onClick' => "return confirm('Ar tikrai norite ištrinti?')"));
                            ?>
                        </td>
                    </tr>
                <?php
                }
                ?>
            </table>
        </form>
        </body>
        </html>
#infoMessage p{
填充:.8em;
边缘底部:1米;
边框:2px实心#ddd;
背景:#FFF6BF;
颜色:#817134;
边框颜色:#FFD324;
文本对齐:居中;
}
帕杜图夫斯
Parduotuvės pavadinimas
Prekės identificatorius
Nuoroda
Redagouti
Ištrinti

我想我理解错了,试一下

返回$this->load->view('name',null,true)或$this->load->view('name',$data,true)


可以尝试使用null或true,返回表。

看起来更像是CSS问题,我们没有看到所有样式表。