In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces Zend Framework how to connect to the Mysql database, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
The details are as follows:
Make sure you load the PDO extension correctly before looking at this. The practice is to edit the php.ini.
Manually add these two lines (without a semicolon;):
Extension=php_pdo.dllextension=php_pdo_mysql.dll
And then we're going to put extension_dir
Point to the directory where php_pdo.dll and php_pdo_mysql.dll are located, such as
Extension_dir = "C:/php5/ext"
OK,let's go..
The home page of the index.php website is also the only entrance.
Lib/App/Article.php
ArticleController.php
Class articleController extends Zend_Controller_Action {private $view; private $article; function _ c****truct () {$this- > view = Zend::registry ('view'); $this- > article = new App_Article ();} public function listAllAction () {$this- > article- > listAll (); $this- > view- > title='View Articles'; echo $this- > view- > render (TPL_DIR.'/tplView.php') } function _ call ($action, $arguments) {$this- > _ redirect ('. /'); print_r ($action); print_r ($arguments);}}? >
Visit http://happycms/article/listall
Get the following output:
Array (1) {[0] = > array (15) {["articleid"] = > string (1) "1" ["categoryid"] = > string (1) "0" ["articletitle"] = > string (4) "test" ["articlefromwhere"] = > string (3) "sdf" ["articlekeywords"] = > string (5) "sdfds" ["articledescription"] = > string (4) "test" ["articlebody"] = > string (9) " Sffsdfsdf "[" authorname "] = > string (8)" haohappy "[" authoremail "] = > string (11)" s...@df.com "[" issticky "] = > string (1)" 0 "[" isrecommanded "] = > string (1)" 0 "[" includeattachment "] = > string (1)" 0 "[" addtime "] = > string (19)" 0000-00-0000 "[" lastedittime "] = > string (19) "0000-00-0000: 00:00" ["checktime"] = > string (19) "0000-00-0000: 00:00"} Thank you for reading this article carefully I hope the article "how to connect Zend Framework to Mysql database" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
Editor to share with you how to use css to achieve watermark diffusion animation effect, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Wechat
About us
Contact us
Product review
car news
thenatureplanet
More Form oMedia:
AutoTimes.
Bestcoffee.
SL News.
Jarebook.
Coffee Hunters.
Sundaily.
Modezone.
NNB.
Coffee.
Game News.
FrontStreet.
GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.