如何在 macOS 上搭建 PHP 开发环境
Linux, Nginx, MySQL, PHP
$ php --version
$ php -v
# PHP 7.3.11 (cli) (built: Apr 17 2020 19:14:14) ( NTS )
# Copyright (c) 1997-2018 The PHP Group
# Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
➜ ~
$ php -v
$ php --version
# PHP 7.3.11 (cli) (built: Apr 17 2020 19:14:14) ( NTS )
# cli test
$ php foreach.php
# -S <addr>:<port> Run with built-in web server.
$ php -S 127.0.0.1:8090
# http://127.0.0.1:8090
# [Sat Aug 8 01:25:06 2020] Failed to listen on 127.0.0.1:8090 (reason: Address already in use)
$ ifconfig
# en0
# inet 192.168.1.12 netmask 0xffffff00 broadcast 192.168.1.255
$ php -S 192.168.1.12:8090
# http://192.168.1.12:8090/
php info
# php info
$ php info.php
<?php
/**
*
* @author xgqfrms
* @license MIT
* @copyright xgqfrms
* @created 2020-08-0
* @modified
*
* @description
* @augments
* @example
* @link http://192.168.1.12:8090/info.php
*
*/
// php info
phpinfo();
echo('$php_info');
// return 1
// $php_info = phpinfo();
// echo($php_info)
?>
https://www.php.net/manual/en/function.phpinfo.php
# php 7.x
$ brew install php
refs
https://learnku.com/articles/35981
Nginx
http://nginx.org/en/download.html
Laravel
Laravel是一个具有表达力,优雅语法的Web应用程序框架。
https://github.com/xgqfrms/php-all-in-one/issues/1
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!