In: 未分类
14 五 2010cass 方法
<style type="text/css">
<!--
* {margin:0;padding:0}
div {
width:500px;
height:500px;
border:1px solid #666;
overflow:hidden;
position:relative;
display:table-cell;
text-align:center;
vertical-align:middle
}
div p {
position:static;
+position:absolute;
top:50%
}
img {
position:static;
+position:relative;
top:-50%;left:-50%;
}
-->
</style>
<div><p><img src="http://www.google.com/intl/en/images/logo.gif" /></p></div>
How can you use yiic shell to create a nested submodule?
to create the 1st module
module test1
to create the sub module
module test1\test2
or possibly
modules test1\modules\test2
‘modules’ => array(
‘admin’ => array(
)),
要在模块里面增加控制器只要
controller admin/System
这样就可以

安装好IETester后再安装Debugbar,如果没有装点这个链接装好:http://files.cnblogs.com/golbz /install-debugbar-v5.2.2.zip(官方链接好像被墙了…无语…)
安装好Debugbar之后,在IETester中依次点<开发人员工具>–<Debugbar插件>–<脚 本>
在最下方的 //JavaScript控制台下面输入

var s = document.createElement("script"); s.src = 'http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'; s.type="text/javascript"; if(document.all){ s.onreadystatechange = function(){ if(this.readyState == "loaded" || this.readyState == "complete"){ alert("loaded success in ie"); } } } else { s.onload = function(){ alert("load success"); } } document.body.appendChild(s);
这里的思路是动态创建一个script标签,然后监听它的onload事件,当它加载完成时,会alert一下加载成功信息。运行脚 本,等到弹出”loaded success in ie”后,表示我们的firebug组件的脚本已经加载进来了。但此时,firebug的界面并没有出现!别着急,我们将输入框中的代码清除掉,再输入如 下代码:
firebug.init();
运行它,过一会儿,就会看到firebug的界面出现了!
参考:
1.http://hi.baidu.com/cly84920/blog/item/20640158a197d68b810a187e.html
2.http://ooxx.me/ietester-debugbar.orz
In: PHP
28 四 2010public function mkdirs($path, $mode = 0777) //creates directory tree recursively
{
$dirs = explode(DIRECTORY_SEPARATOR,$path);
$pos = strrpos($path, ".");
if ($pos === false) { // note: three equal signs
// not found, means path ends in a dir not file
$subamount=0;
}
else {
$subamount=1;
}
for ($c=0;$c < count($dirs) - $subamount; $c++) {
$thispath="";
for ($cc=0; $cc <= $c; $cc++) {
$thispath.=$dirs[$cc].DIRECTORY_SEPARATOR;
}
if (!file_exists($thispath)) {
//print "$thispath<br>";
mkdir($thispath,$mode);
}
}
}
在view里面只要这样就可以引入jquery
Yii::app()->clientScript->registerCoreScript('jquery');
引入外面网址
$cs->registerScriptFile('http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js');
引入本地站点
$cs->registerScriptFile(Yii::app()->baseUrl . '/themes/comm/js/upload.js', CClientScript::POS_HEAD);
引入css
$cs->registerCssFile(Yii::app()->baseUrl . '/js/star-rating/jquery.rating.css');
yiic 去执行时候因为调用另外一个model 所以会出现Trying to get property of non-object
所以在要在调用model之前判断这个model是否存在
if($tmpModel) {
return $tmpModel->lastname;
} else {
return null;
}
jquery 幻灯新闻
例子(demo):http://demo.webdeveloperplus.com/featured-content-slider/

http://www.phpdemos.com.br/detail/265/easynews-plugin-jquery.html

http://css-tricks.com/creating-a-slick-auto-playing-featured-content-slider/
http://css-tricks.com/examples/FeaturedContentSlider/
s3Slider jQuery plugin
http://www.serie3.info/s3slider/demonstration.html
http://billwscott.com/carousel/carousel_tabs.html#
http://workshop.rs/projects/jqfancytransitions/
http://css-tricks.com/examples/StartStopSlider
http://www.jumpeyecomponents.com/Flash-Components/User-Interface/JC-Play-List-285/examples.htm
In: PHP
21 四 2010http://hi.baidu.com/comdeng/blog/item/f272362e47ce29564ec226c5.html
$str = "php编程";
if (preg_match("/^[\x{4e00}-\x{9fa5}]+$/u",$str)) {
print("该字符串全部是中文");
} else {
print("该字符串不全部是中文");
}
In: FLASH
15 四 2010
iebook杂志制作软件
http://ftp-dg.pconline.com.cn/pub/download/201003/iebook_setup_6.0.exe
最近评论