Zend框架和Ext-Js4,文件和文件夹结构
我正在尝试将 Zend Frame work 和 Ext-Js4 一起使用。
但我不知道如何正确设置文件和文件夹结构。
我这样设置,
在 application/controllers/IndexController.php 中
$this->view->headScript()->appendFile('/js/ext-4.0.7/ext-all.js','text/javascript');
$this->view->headScript()->appendFile('/js/app.js','text/javascript');
$this->view->headLink()->appendStylesheet('/js/ext-4.0.7/resources/css/ext-all.css');
是它的结构正确吗?有人有更好的主意吗?
谢谢。
I am trying to use Zend Frame work and Ext-Js4 together.
But I don't know how to setup file and folder structure correctly.
I setup like this,
And in application/controllers/IndexController.php
$this->view->headScript()->appendFile('/js/ext-4.0.7/ext-all.js','text/javascript');
$this->view->headScript()->appendFile('/js/app.js','text/javascript');
$this->view->headLink()->appendStylesheet('/js/ext-4.0.7/resources/css/ext-all.css');
Is it right structure? anyone has a better idea?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您在整个应用程序中使用 Ext-Js4,更好的主意是将其添加到 bootstap 中,这样您就不必在每个控制器中包含 javascript 路径。
If you're using Ext-Js4 in your entire application, a better idea would be to add this in your bootstap, so that you don't have to include your javascript paths in every controllers.
我倾向于使用这样的布局:
然后在我的 application.ini 文件中我包括:
总是有更多的方法来给众所周知的猫剥皮!
I tend to use a layout for things like this:
Then in my application.ini file I include:
There are always more ways to skin the proverbial cat!