Home  >  Article  >  Backend Development  >  ZF 引入文件有关问题

ZF 引入文件有关问题

WBOY
WBOYOriginal
2016-06-13 12:42:10755browse

ZF 引入文件问题
这个是控制器

<br />
 require_once APPLICATION_PATH.'phperror_config.php';<br />
 require_once APPLICATION_PATH.'/models/Admin.php';<br />
<br />
<br />
class AdminController extends Zend_Controller_Action<br />
{<br />
<br />
	public function init()<br />
	{<br />
		/* Initialize action controller here */<br />
	}<br />
<br />
	//跳到登录界面<br />
	public function indexAction(){<br />
		<br />
	}<br />
	<br />
	<br />
	//实现登录功能的检查<br />
	public function loginAction(){<br />
		<br />
		$name=$this->getRequest()->getParam('adminname');//用zend的方法来取界面中的变量<br />
		$password=$this->getRequest()->getParam('adminpassword');	<br />
		<br />
		<br />
		<br />
		//创建一个表模型对象<br />
	    $adminModel=new Admin();<br />
		<br />
		<br />
		print_r($name);<br />
		exit();<br />
		<br />
		<br />


这个是表模型
<br />
 class Admin extends Zend_Db_Table {<br />
<br />
   	<br />
   	 protected  $_name="admin";<br />
	 protected $_primary="id";<br />




问题在创建不成功表模型,一旦加上require_once连界面都看不到 是空白 的 ,或者说是应用程序错误,我刚自学这个框架,不懂啊 ,求大侠指点

Zend 文件引入 表模型
Statement:
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