<i id='sXiqN'><tr id='sXiqN'><dt id='sXiqN'><q id='sXiqN'><span id='sXiqN'><b id='sXiqN'><form id='sXiqN'><ins id='sXiqN'></ins><ul id='sXiqN'></ul><sub id='sXiqN'></sub></form><legend id='sXiqN'></legend><bdo id='sXiqN'><pre id='sXiqN'><center id='sXiqN'></center></pre></bdo></b><th id='sXiqN'></th></span></q></dt></tr></i><div id='sXiqN'><tfoot id='sXiqN'></tfoot><dl id='sXiqN'><fieldset id='sXiqN'></fieldset></dl></div>
    • <bdo id='sXiqN'></bdo><ul id='sXiqN'></ul>

    1. <small id='sXiqN'></small><noframes id='sXiqN'>

      1. <tfoot id='sXiqN'></tfoot>

        <legend id='sXiqN'><style id='sXiqN'><dir id='sXiqN'><q id='sXiqN'></q></dir></style></legend>

        在 Yii 框架中包含 CSS、javascript 文件

        Include CSS,javascript file in Yii Framework(在 Yii 框架中包含 CSS、javascript 文件)
        <legend id='tZFSA'><style id='tZFSA'><dir id='tZFSA'><q id='tZFSA'></q></dir></style></legend>

          <i id='tZFSA'><tr id='tZFSA'><dt id='tZFSA'><q id='tZFSA'><span id='tZFSA'><b id='tZFSA'><form id='tZFSA'><ins id='tZFSA'></ins><ul id='tZFSA'></ul><sub id='tZFSA'></sub></form><legend id='tZFSA'></legend><bdo id='tZFSA'><pre id='tZFSA'><center id='tZFSA'></center></pre></bdo></b><th id='tZFSA'></th></span></q></dt></tr></i><div id='tZFSA'><tfoot id='tZFSA'></tfoot><dl id='tZFSA'><fieldset id='tZFSA'></fieldset></dl></div>

          • <small id='tZFSA'></small><noframes id='tZFSA'>

            • <tfoot id='tZFSA'></tfoot>
              • <bdo id='tZFSA'></bdo><ul id='tZFSA'></ul>

                    <tbody id='tZFSA'></tbody>

                  本文介绍了在 Yii 框架中包含 CSS、javascript 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何在 Yii 框架中包含 Javascript 或 CSS 文件?

                  How to include a Javascript or CSS file in Yii Framework?

                  我想在我的网站上创建一个页面,该页面运行了一个小的 Javascript 应用程序,因此我想在特定视图中包含 .js.css 文件.

                  I want to create a page on my site that has a little Javascript application running, so I want to include .js and .css files in a specific view.

                  推荐答案

                  是这样的:

                  <?php  
                    $baseUrl = Yii::app()->baseUrl; 
                    $cs = Yii::app()->getClientScript();
                    $cs->registerScriptFile($baseUrl.'/js/yourscript.js');
                    $cs->registerCssFile($baseUrl.'/css/yourcss.css');
                  ?>
                  

                  这篇关于在 Yii 框架中包含 CSS、javascript 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Is PHP or PHP based web framework stateful or stateless?(PHP 或基于 PHP 的 Web 框架是有状态的还是无状态的?)
                  How to parse django style template tags(如何解析 django 样式模板标签)
                  What is a good setup for editing PHP in Emacs?(在 Emacs 中编辑 PHP 的好设置是什么?)
                  How to check whether specified PID is currently running without invoking ps from PHP?(如何在不从 PHP 调用 ps 的情况下检查指定的 PID 当前是否正在运行?)
                  What#39;s the difference between escapeshellarg and escapeshellcmd?(escapeshellarg 和escapeshellcmd 有什么区别?)
                  php in background exec() function(php 后台 exec() 函数)
                  <legend id='Qc7lL'><style id='Qc7lL'><dir id='Qc7lL'><q id='Qc7lL'></q></dir></style></legend>
                    <tbody id='Qc7lL'></tbody>

                    <small id='Qc7lL'></small><noframes id='Qc7lL'>

                    • <i id='Qc7lL'><tr id='Qc7lL'><dt id='Qc7lL'><q id='Qc7lL'><span id='Qc7lL'><b id='Qc7lL'><form id='Qc7lL'><ins id='Qc7lL'></ins><ul id='Qc7lL'></ul><sub id='Qc7lL'></sub></form><legend id='Qc7lL'></legend><bdo id='Qc7lL'><pre id='Qc7lL'><center id='Qc7lL'></center></pre></bdo></b><th id='Qc7lL'></th></span></q></dt></tr></i><div id='Qc7lL'><tfoot id='Qc7lL'></tfoot><dl id='Qc7lL'><fieldset id='Qc7lL'></fieldset></dl></div>

                        <tfoot id='Qc7lL'></tfoot>
                          <bdo id='Qc7lL'></bdo><ul id='Qc7lL'></ul>