PHP 学习笔记
关键字
this:指向对象
self:指向类
parent 指向父类
php 源码安装
#cent os
#yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
yum install libxml2-devel.x86_64
yum install openssl.x86_64 openssl-devel.x86_64 -y
yum install libcurl.x86_64 libcurl-devel.x86_64 -y
yum install libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 -y
yum install libjpeg.x86_64 libpng freetype libjpeg-devel libpng-devel freetype-devel -y
yum install libmcrypt libmcrypt-devel -y
# ubantu
sudo apt-get install libxml2-dev
sudo apt-get install build-essential
sudo apt-get install openssl
sudo apt-get install libssl-dev
sudo apt-get install make
sudo apt-get install curl
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libpng-dev
sudo apt-get install libmcrypt-dev
sudo apt-get install libreadline6 libreadline6-dev
sudo apt-get install libfreetype6-dev
# linux 源码安装常规3步走
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir=/usr/local/freetype --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --disable-fileinfo --enable-opcache --with-iconv=/usr/local
缺 libconv 库时,可源码安装该库到 /usr/local(--with-iconv 指定的位置,库地址:http://www.gnu.org/software/libiconv/)
make && make install
cp php.ini-production /app/soft/php/lib/php.ini
// 更新 rpm 源:rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
composer 安装
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
composer config -g secure-http false
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论