
我在 macOS Catalina 10.15.3 系統上本地安裝了 PHP;
php -i
phpinfo()
PHP Version => 7.3.11
我已經啟動並運行 Nginx 來提供靜態檔案:
讓 Nginx 和 PHP 提供腳本檔案最簡單的方法是什麼?我知道那裡有很多文章,但所有文章都以不同的方式存在,並非所有文章都適合我的需求。我看過了https://www.php.net/manual/en/install.fpm.install.php但找不到php.ini
我正在使用的網頁伺服器?由於我還不能提供 PHP 文件,所以我不能簡單地將文件放在根目錄上並使用:phpinfo()
php -i | grep "Configuration File"
Configuration File (php.ini) Path => /etc
Loaded Configuration File => (none)
有關本地設定的更多資訊;
server {
listen 8080;
server_name localhost;
#charset koi8-r;
access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm index.php;
}
因此,嘗試安裝PHP-FPM
並立即開始樂趣和遊戲(在線參考);
$ brew tap homebrew/dupes
$ brew tap homebrew/php
$ brew install --without-apache --with-fpm php71
Error: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
Error: homebrew/php was deprecated. This tap is now empty as all its formulae were migrated.
Error: invalid option: --without-apache
如果您能提供一些線索或推動我朝正確的方向前進,那就太好了。