RHEL7.2 配置笔记 2 - PHP test

20 篇文章 0 订阅

[root@localhost ~]# cat  /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.2 (Maipo)
[root@localhost ~]# 

[root@localhost ~]# rpm -qa  |grep php 

php-5.4.16-36.el7_1.x86_64
php-common-5.4.16-36.el7_1.x86_64
php-mysql-5.4.16-36.el7_1.x86_64
php-cli-5.4.16-36.el7_1.x86_64
php-pdo-5.4.16-36.el7_1.x86_64

[root@localhost ~]# 

lake@localhost:~$ php -v
PHP 5.4.16 (cli) (built: Jun 10 2015 04:34:17) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
lake@localhost:~$ which php
/usr/bin/php
lake@localhost:~$ rpm -qf /usr/bin/php
php-cli-5.4.16-36.el7_1.x86_64
lake@localhost:~$ 

 

lake@localhost:~/php$ cat   index.php  
echo "<?php echo "the 1st test page \r\n"; phpinfo(); ?>" 

lake@localhost:~/php$ 

 

###  command line test 

lake@localhost:~/php$ php  index.php 
echo "the 1st test page 
PHP Warning:  phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/lake/php/index.php on line 1
phpinfo()
PHP Version => 5.4.16


System => Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64
Build Date => Jun 10 2015 04:34:11
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
Scan this dir for additional .ini files => /etc/php.d
Additional .ini files parsed => /etc/php.d/curl.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/json.ini,

/etc/php.d/mysql.ini,

..............

 

 

###### web test in Apache httpd web server 

lake@localhost:~/php$ sudo  cp index.php  /var/www/html/

visit :    https://localhost/index.php
  http://localhost/index.php


echo "the 1st test page
PHP Logo
PHP Version 5.4.16
............

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值