php 技能树

Mac 基本操作:ctrl + 空格 切换输入法 /ctrl + caps lock 切换大小写/ctrl +c 复制 /ctrl + v粘贴 /ctrl + x剪切

Mac工具类软件安装 xcode

          sourcetree(atlassian 账号 caoyuntao123)

          phpstorm[ 激活网址:http://www.mb11717563.icoc.me/nd.jsp?id=77&groupId=-1]

git 基本命令 复制:git clone https://github.com/....    target_dir

           切换分支: git checkout -b dev 切换到新创建的dev分支 相当于 git branch dev + git checkout dev   git branch 查看当前分支 git reset --hard ae34f0重置

linux 基本命令: mkdir dirname / rm -r dirname / vim filename /rm filename   cp filename  target_dir / mv filename target_dir chmod 777 filename

       查找文件 find /Users/apple/php_note -name upload_file.php  也可以通过grep正则匹配

       vim 编辑新建文件 wq 保存退出 w保存 q退出 q!强制退出 dd删除 u撤销   :/keyword 定位字符串

       www.php.net

       redis.cn 中文官网 redis.io  ssdb.io ssdb.cn

       phalconphp.com/zh/

源码安装分三步 配置(./config) 编译(make) 安装(make install)

php 源码编译安装

       安装依赖库

       安装依赖

       wget下载压缩包 

       make && make install

nginx 源码编译安装 

       wget http://nginx.org/download/nginx-1.12.2.tar.gz

         tar -zxvf nginx-1.12.2.tar.gz
         cd nginx-1.12.2
         ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_sub_module
         make
       make install

 相关配置文件路径

 /usr/local/nginx/conf/nginx.conf

 /usr/local/etc/php-fpm.conf

 /usr/local/etc/ssdb.conf

   /usr/local/etc/redis.conf

   /usr/local/lib/php.ini

php 字符串函数:

  strtolower(string $str) 转化为小写  

  strtoupper(string $str)转化为大写

  strrev(string $str)反转

  strpos($str,$pattern) 查找 字符串 的位置  

  str_split($str,$length) explode(','$str)拆分为数组 str_split()控制数组元素长度   

  str_replace(' ','_',$str);空格替换下划线

php 数组操作

   去重 array_unique() array_flip()两次交换键值 即刻消去重复元素

   in_array('a',[a,b,c,d]);

   排序:

   sort() 函数用于对数组单元从低到高进行排序。
   rsort() 函数用于对数组单元从高到低进行排序。
     asort() 函数用于对数组单元从低到高进行排序并保持索引关系。
     arsort() 函数用于对数组单元从高到低进行排序并保持索引关系。
     ksort() 函数用于对数组单元按照键名从低到高进行排序。
     krsort() 函数用于对数组单元按照键名从高到低进行排序。

  

    

        数组开头元素的插入与移除

   插入:array_unshift()

   $arr=array('a'=>'11','b'=>'22','c'=>'33');
   array_unshift($arr,'333');

       移除:array_shift()

   $arr=array('a'=>'11','b'=>'22','c'=>'33');
   array_shift($arr);

   数组末尾元素的插入与移除

   插入

   $arr=array('a'=>'11','b'=>'22','c'=>'33');
   array_push($arr,'tom');

   移除

   $arr=array('a'=>'11','b'=>'22','c'=>'33');
   array_pop($arr);

原文地址:https://www.cnblogs.com/hiraeth/p/8758932.html