来自 print_r
Array (
[0] => stdClass Object (
[id] => 2729
[title] =>
[image_file] => M6_Black_Back.jpg
[product] => 2
[active] => 0
[created] => 2013-06-19 23:14:51
[rank] => 1
[publish] => 0
[back_photo] => M6_Black_Back.jpg
)
)
这是在我的控制器中
$data['back'] = $this->global_model->custom_query('
SELECT *,image_file AS back_photo FROM system_product_photos
WHERE product = 2 AND rank = 1
');
$this->load->view('template', $data);
我一辈子都无法<?=$back->back_photo?>
输出任何东西。警告 codeignighter 菜鸟警报!