Cov txheej txheem:

PHP ntsia qhov twg ntawm Mac?
PHP ntsia qhov twg ntawm Mac?

Video: PHP ntsia qhov twg ntawm Mac?

Video: PHP ntsia qhov twg ntawm Mac?
Video: Karaoke ntsia qhov twg tsis pom koj 2024, Kaum ib hlis
Anonim

Teeb lub php ib . ib ini qhov chaw los yog siv lub default A raug qhov chaw nyob rau hauv macOS yog /usr/local/ php ib / php ib . ib ini thiab hu rau phpinfo() yuav nthuav tawm cov ntaub ntawv no.

Hais txog qhov no, puas yog PHP ntsia rau Mac?

Ob leeg PHP thiab Apache yog qhov qhib software dawb thiab ob qho tib si tuaj ntsia ntawm txhua Macs. PHP yog server-sab software, thiab Apache yog qhov siv ntau tshaj plaws web server software. Enabling Apache thiab PHP ntawm a Mac tsis yooj yim ua.

Tom qab ntawd, lo lus nug yog, Kuv yuav hloov kho PHP ntawm kuv Mac li cas? Siv Homebrew

  1. Ua ntej, xyuas kom meej tias koj homebrew yog hloov tshiab. brew hloov tshiab && brew upgrade.
  2. Siv Brew Tap hais kom ua tso cai rau Homebrew coj mus rhaub rau lwm qhov chaw cia khoom ntawm cov mis. brew kais homebrew / dupes.
  3. Tshawb xyuas php version siv cov lus txib hauv qab no. php -v.
  4. Mus unlink lub xeem version.
  5. Txhawm rau nruab qhov tshiab version ntawm php.

Kuj kom paub yog, Kuv yuav ua li cas qhib PHP ntawm Mac?

Qhib PHP

  1. Qhib Terminal thiab ntaus sudo nano /etc/apache2/httpd.conf thiab nias nkag.
  2. Nias Ctrl + W uas yuav coj mus nrhiav.
  3. Nrhiav php thiab nias nkag.
  4. Rho tawm # los ntawm #LoadModule php7_module libexec/apache2/libphp7.so.
  5. Nias Ctrl + O ua raws li Enter kom txuag qhov kev hloov koj nyuam qhuav ua.
  6. Nias Ctrl + X kom tawm nano.

PHP INI nyob qhov twg hauv xampp Mac?

ib ini file yog nyob rau hauv C: xamppphp nplaub tshev. Hauv XAMPP ( Mac OS X ), cov php ib . ib ini cov ntaub ntawv yog nyob rau hauv /Applications/ XAMPP /xamppfiles/etc folder.

Pom zoo: