Weekend Log 4.6

PHP相關

經常使用PHP編譯 .\/configure

1
2
./configure -prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/bin/mysql_config --with-iconv-dir=/usr/local --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path   --enable-mbregex --enable-fastcgi --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash  --enable-sockets --with-xmlrpc --enable-zip --enable-pdo --with-pdo-mysql --with-mysql
// 須要安裝MySQL 以及一些其餘的經常使用lib

PHP JSON處理

對於返回的util 可使用5.4開始使用的trait進行嵌入 而後self\:\:調用php

1
2
3
4
5
6
7
8
return json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);

JSON_UNESCAPED_SLASHES (integer)
不要編碼 /。 自 PHP 5.4.0 起生效。
JSON_UNESCAPED_UNICODE (integer)
以字面編碼多字節 Unicode 字符(默認是編碼成 \uXXXX)。 自 PHP 5.4.0 起生效

string json_last_error_msg ( void ) // php55以上纔有這個方法 獲得json轉換的錯誤

 

PHP-FPM搭建中NGINX出現file not found的問題-參見備忘錄

TODOLIST

centos上配一個LNMP

Linux MOUNT AWK等命令

Kafka、RabbitMQ、Hadoop、Spark、Redis、Memcached等工具類的使用

PHP YII框架實現

相關文章
相關標籤/搜索