PHP+Smarty环境下网页与数据库的连接和访问  

Connection and access database in the PHP+Smarty environment

在线阅读下载全文

作  者:黄玲娜[1] 

机构地区:[1]无锡城市职业技术学院,江苏无锡214000

出  处:《计算机时代》2015年第12期65-66,69,共3页Computer Era

摘  要:在PHP开发环境中,Smarty模板是一种处于领先地位的主流模板,能高效的实现网站前台和数据库后台之间的交互,将后台数据库中的数据信息呈现在前台网页上。Smarty模板将与数据库的连接等操作封装在类中,在以后的开发中只需要调用即可;利用PHP文件实现对数据库的代码控制,将对数据库的访问结果通过tpl模板文件显示,这种做法使得代码控制和页面美工分离开来,开发过程更加清晰明了。In PHP development environment, the Smarty template is a mainstream template which can realize the interaction between the front desk and the database. The data information in the background database is presented in the front page. Smarty template encapsulates the operations of connection with database and so on in the class, in the future development only need to call. The PHP file is used to achieve the code control of the database, the database access results are displayed through the TPL template file, this approach separates the code control and the page art, makes the development process more clear.

关 键 词:PHP SMARTY 网站开发 数据库访问 

分 类 号:TP311.1[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象