一、什么是PHP
PHP 是 PHP Hypertext Preprocessor(超文本与处理器)的首字母缩写。这种方法叫做递归缩写。
php有多种用途,特别是web网站开发。快速,灵活,实用使得php能够更好的开发任何网站。
PHP 是一种 HTML 嵌入式的脚本语言。php文件以.php结尾。它的很多语法来自 C,Java 和 Perl,并具有几个 PHP 独有的特点。该语言的主要目标是让 Web 开发人员快速地书写动态生成的网页
二、PHP的安装
下载安装包
解析源码
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --with-curl --with-iconv --with-mhash --with-zlib --with-openssl --enable-mysqlnd --with-mysqli --with-pdo-mysql --disable-debug --enable-sockets --enable-soap --enable-inline-optimization --enable-xml --enable-ftp --enable-gd --enable-exif --enable-mbstring --enable-bcmath --with-fpm-systemd
make
make install
安装成功 !!!
启动PHP
三、PHP与nginx的整合
进入 cd /usr/local/nginx/conf
更改如下
在 cd /usr/local/nginx/html 写一个PHP脚本
安装memcache-4.0.5.2.tgz 并且加入到系统环境变量中
下载memcached 并且启动
配置memcached相关文件
我们通过测试发现 100的时候有错误 1000的时候错误会更多 后端处理不过来
我们使用 example.php在测试一遍
没有错误文件实验成功!!!