load->helper("form"); //$sql = "select * from userinf"/> load->helper("form"); //$sql = "select * from userinf">
Home > Backend Development > PHP Tutorial > PHP MVC菜鸟有关问题.

PHP MVC菜鸟有关问题.

WBOY
Release: 2016-06-13 12:40:35
Original
902 people have browsed it

PHP MVC初学者问题...

<br />
		function postedit(){<br />
			$this->load->helper("url");<br />
			$this->load->helper("form");<br />
			//$sql = "select * from userinfo where username = 'zhangning'";<br />
			$data["user"] = $this->db->query("select * from userinfo where username = '".$this->uri->segment(3)."'");<br />
			<br />
			$this->load->view("postedit",$data);<br />
		}<br />
Copy after login

前台:
<?php echo $user->Age ?>
Copy after login




A PHP Error was encountered

Severity: Notice

Message: Undefined property: CI_DB_mysql_result::$Age

Filename: views/postedit.php

Line Number: 9

啥原因呀?找了半天了。。。刚学2 3天。。看不出来哪有错。
$data["user"] ="fsdfsd";如果这样前台会输出值得

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template