Html的确定就是不能重用,MVC可以在_Layout.cshtml中将每个页面都需要的js和css文件(如jq,bootstrap等)都引用进去,webform就麻烦一点. webForm需要给所以页面派生个父类BasePage,然后在BasePage中给每个页面的Header添加css和js文件. 下面是添加动态js和css的代码. using System; using System.Collections.Generic; using System.Linq; using System.
今天单点登陆要用到 spl_autoload_register,但是YII的Yii::autoload在包含失败的时候会抛异常,就不会执行(spl_autoload_call)其他spl_autoload_register的了, 于是想到了一个解决的办法,就是删除所有的spl_autoload_functions 然后把 单点登录的 autoload函数加上,最后再加上 Yii原有的autoload函数 即可. // set up __autoload if (function_exists(