1. 安装php,参考:https://kittmedia.com/en/2021/macos-install-nginx-mysql-and-php-via-brew/
brew install php@7.4
below is the finish output:
To enable PHP in Apache add the following to httpd.conf and restart Apache: LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> Finally, check DirectoryIndex includes index.php DirectoryIndex index.php index.html The php.ini and php-fpm.ini file can be found in: /usr/local/etc/php/8.2/ To restart php after an upgrade: brew services restart php Or, if you don't want/need a background service you can just run: /usr/local/opt/php/sbin/php-fpm --nodaemonize
标签:index,php,httpd,Mac,Wordpress,usr,install,Php,local From: https://www.cnblogs.com/saaspeter/p/17007254.html