然之BUG笔记

如果要清空表中的所有记录,可以使用下面的两种方法: delete from table1    或  truncate table table1; 

查看表中所有数据:select * from table1;

nl2br()  在字符串所有新行之前插入 HTML 换行标记


在linux中输入git ,查看是否已安装,否,则:sudo apt_get install git


 

 html文档中并未引入js相关的文件,那它们之间的操作怎样关联, 和js 文档怎样是关联到一起的。

<?php include '../../../sys/common/view/footer.modal.html.php';?> 

<?php
    /** 
     * The common modal footer view file of RanZhi.
     *
     * @copyright   Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
     * @license     ZPL (http://zpl.pub/page/zplv12.html)
     * @author      Xiying Guan <guanxiying@xirangit.com>
     * @package     RanZhi     
     * @version     $Id$
     * @link        http://www.ranzhico.com
     */
    ?>
    <?php if(helper::isAjaxRequest()):?>
        </div>
      </div>                   
    </div>
    <?php if(isset($pageJS)) js::execute($pageJS);?>//调用对应目录下的js文件。
    <?php else:?>              
    <?php include  $this->app->getAppRoot() . '/common/view/footer.html.php'; ?>
    <?php endif;?> 
jQuery隐藏
$(this).hide()

$("p").hide()
$(.).hide()
$("#").hide()
php 数组函数
/*array array_count_values ( array $array )
*array_count_values() 返回一个数组: 数组的键是 array 里单元的值; 数组的值是 array 单元的值出现的次数。
*/

<?php
$array = (1,"hello",1,"hello","world");
print_r(array_count_values($array)); //以数组的值为键名,该值在数组中出现的次数作为值
?>

this print:
array(
[1] => 2;
[hello] => 2;
[world] => 1;
)

 

 

/*
array array_map ( callable $callback , array $array1 [, array $... ] )
* array_map():返回数组,是为 array1 每个元素应用 callback函数之后的数组。 callback 函数形参的数量和传给 array_map() 数组数量,两者必须一样。
*/
<?php
$ar = array("WUMO","WuMo",1,"Abby Wu","abby wu","wumo",1);
$br = array_map('strtolower', $ar); 
print_r($br);

$cr1 = function($n){ return $n*2; };//匿名函数
$cr2 = array(1,2,3,4,5);
$dr = array_map($cr1, $cr2);
print_r($dr); );
?>

this print:

Array
(
[0] => wumo
[1] => wumo
[2] => 1
[3] => abby wu
[4] => abby wu
[5] => wumo
[6] => 1
)
Array
(
[0] => 2
[1] => 4
[2] => 6
[3] => 8
[4] => 10
)

 

posted @ 2017-09-27 16:23  Abby*^o^*  阅读(207)  评论(0编辑  收藏  举报