Archive for 七月, 2010

MySQL 字符串函数:字符串截取

MySQL 字符串截取函数:left(), right(), substring(), substring_index()。还有 mid(), substr()。其中,mid(), substr() 等价于 substring() 函数,substring() 的功能非常强大和灵活。 (continue reading…)


linux 下使用gzip压缩与解压文件

gzip 和 gunzip

要使用 gzip 来压缩文件,在 shell 提示下键入以下命令:

gzip filename

文件即会被压缩,并被保存为 filename.gz

要扩展压缩的文件,键入以下命令:

gunzip filename.gz

filename.gz 会被删除,而继之以 filename

你可以使用 gzip 命令同时处理多个文件和目录,方法是将它们逐一列出,并用空格间隔:

gzip -r filename.gz file1 file2 file3 /usr/work/school 

上面的命令把 file1file2 file3、以及 /usr/work/school 目录的内容(假设这个目录存在)压缩起来,然后放入 filename.gz 文件中。

注:使用gzip和gunzip时,会删除原有的文件。


Linux常用操作

Linux tar压缩与解压命令用法:

[root@linux ~]# tar -zcvf /tmp/etc.tar.gz /etc <==打包后,以gzip压缩

[root@linux src]# tar -zxvf /tmp/etc.tar.gz

Linux下mysql备份 恢复:

#mysqldump -u 用户名 -p 库名 | gzip > tm_050519.sql.gz

解压缩:gunzip filename.gz

#mysql -u 用户名 -p 库名< /home/beinan/linuxsir031130.sql (continue reading…)


Flexform配置类似inline效果

====== Flexform ======


    LLL:EXT:cms/locallang_ttc.xml:media.additionalOptions
    array
    
1
array LLL:EXT:cms/locallang_ttc.xml:media.params select LLL:EXT:cms/locallang_ttc.xml:media.params.autoPlay autoPlay LLL:EXT:cms/locallang_ttc.xml:media.params.loop loop select LLL:EXT:cms/locallang_ttc.xml:media.params.on 1 LLL:EXT:cms/locallang_ttc.xml:media.params.off 0 input 16 array LLL:EXT:cms/locallang_ttc.xml:media.params.customEntry text 6 60

How to get:

$this->pi_initPIflexForm(); //Init FlexForm configuration for plugin
$this->lConf = array(); // Setup our storage array...
// Assign the flexform data to a local variable for easier access
$piFlexForm = $this->cObj->data ['pi_flexform'];
// Traverse the entire array based on the language...
// and assign each configuration option to $this->lConf array...
if (!empty($piFlexForm['data'])) {
    foreach ($piFlexForm['data'] as $sheet => $data) {
        if (!empty($data)) {
            foreach ($data as $lang => $value) {
                if (!empty($value)) {
                    foreach ($value as $key => $val) {
                        if ($key == 'multiOptions') {
                            foreach ($val['el'] as $mmKey => $mmVal) {
                                foreach ($mmVal as $mmListKey => $mmListVal) {
                                    if ($mmListKey == 'container1') {
                                        foreach ($mmListVal['el'] as $keyshow => $keyval) {
                                            $this->container1[$keyshow][] = $keyval['vDEF'];
                                        }
                                    }
                                    if ($mmListKey == 'container2') {
                                        foreach ($mmListVal['el'] as $keyshow => $keyval) {
                                            $this->container2[$keyshow][] = $keyval['vDEF'];
                                        }
                                    }
                                }
                            }
                        } else {
                            $this->lConf[$key] = $this->pi_getFFvalue($piFlexForm, $key, $sheet);
                        }

                    }
                }
            }
        }
    }
}

Server Application Unavailable

Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable.  Please hit the “Refresh” button in your web browser to retry your request.
(continue reading…)

1 Comment more...

typo3取消Imagemagick锐化效果

install里设置:

$TYPO3_CONF_VARS[‘GFX’][‘im_no_effects’] = ‘1’;



staticinfotables调用方法

pi中常用到国家列表,我们调用static info tables,方法如下: (continue reading…)



fancybox失效解决方法

通常我们这样使用:

$(“#test”).fancybox();

但没有效果。

原因之一是因为js引用的问题.

将以下代码放到HTML中,而不是像typo3用TS配置。

<script type=”text/javascript” src=”fancybox/jquery.fancybox-1.3.1.js”></script>


Copyright © 1996-2010 Add Lives. All rights reserved.
iDream theme by Templates Next | Powered by WordPress