热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

模拟考试

设为首页

收藏此页面

订阅邮箱地址

Zend Framework 面试题与答案

问题 16. How to include css from controller and view in zend.

From within a view file: $this->headLink()->appendStylesheet(filename.css);
From within a controller: $this->view->headLink()->appendStylesheet(filename.css);
And then somewhere in your layout you need to echo out your headLink object:
headLink();?>

这有帮助吗? 添加评论 查看评论
 

问题 17. How do you protect your site from sql injection in zend when using select query?

You have to quote the strings,
$this->getAdapter ()->quote ( );
$select->where ( = , );
OR (If you are using the question mark after equal to sign)
$select->where ( = ? , );

这有帮助吗? 添加评论 查看评论
 

问题 18. What is MVC?

=> Model-View-Controller development pattern.
=> MVC is a software approach that separates application logic from presentation.

这有帮助吗? 添加评论 查看评论
 

问题 19. Features of MVC in Zend Framework?

=> Declare custom routing rules
Not limited to controller/action/param format
=> Optional Controller Plugins, Action Helpers, and View Helpers
ErrorHandler plugin handles exceptions, 404 errors, etc.
FlashMessenger, Redirector, ViewRenderer helpers
Output common HTML elements in views
=> Extensible interfaces
Write your own plugins and helpers

这有帮助吗? 添加评论 查看评论
 

问题 20. Why can't Zend_Form render my File element without errors?

The file element needs a special file decorator, which is added by default. When you set your own decorators for file elements, you delete the default decorators.
For example:
$element->setDecorators(array(
array('ViewHelper'),
array('Errors')
));
You should use a File decorator instead of the ViewHelper for the file element, like so:
$element->setDecorators(array(
array('File'),
array('Errors')
));

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。