Qhov wikiHow qhia koj yuav ua li cas tuav lub vev xaib ntawm koj tus kheej lub network hauv tsev. Koj yuav siv qhov program pub dawb hu ua MAMP los ua li ntawd.
Cov kauj ruam
Ntu 1 ntawm 6: Npaj Npaj Lub Vev Xaib
Kauj Ruam 1. Ua kom ntseeg tau tias koj li Internet Service Provider tso cai hosting
Thaum lub sijhawm me me hauv zos feem ntau yog qhov zoo tsis hais txog koj li Internet Service Provider txoj cai, tsim lub vev xaib uas muaj cov tsheb loj los ntawm lwm lub network tuaj yeem tawm tsam koj li ISP cov lus siv.
Feem ntau, koj tuaj yeem hloov kho koj li phiaj xwm Internet mus rau "Kev Lag Luam" (lossis zoo sib xws) tus lej txhawm rau txhawm rau pab txhawb rau kev ua haujlwm loj dua
Kauj Ruam 2. Tsim koj lub vev xaib qhov chaws yog tias tsim nyog
Yog tias koj tsis muaj cov ntaub ntawv lub vev xaib uas koj tuaj yeem siv rau koj lub vev xaib, koj yuav tsum tsim ib qho.
Kauj Ruam 3. Txhim kho cov ntawv nyeem uas tuaj yeem lis cov ntaub ntawv PHP
Nyob ntawm seb koj puas siv lub khoos phis tawj Windows lossis Mac, qhov no yuav txawv:
- Windows - Notepad ++ yog koj thawj koom ruam zoo tshaj.
- Mac - Koj tuaj yeem rub tawm cov ntawv sau dawb hu ua "BBEdit" los ntawm kev mus rau https://www.barebones.com/products/bbedit/ thiab nyem Dawb download ntawm sab xis ntawm nplooj ntawv.
Ntu 2 ntawm 6: Txhim Kho MAMP
Kauj Ruam 1. Qhib MAMP lub vev xaib
Mus rau https://www.mamp.info/en/downloads/ hauv koj lub computer lub vev xaib.
Nco ntsoov tias koj ua qhov no ntawm lub khoos phis tawj uas koj xav tuav koj lub server
Kauj ruam 2. Xaiv qhov kev xaiv rub tawm
Nyem ob qho tib si MAMP & MAMP PRO 4.0.1 rau Windows version ntawm MAMP lossis MAMP & MAMP PRO 5.0.1 rau Mac version ntawm MAMP. MAMP teeb tsa cov ntawv yuav pib rub tawm.
Koj yuav tsum tau lees paub qhov rub tawm lossis xaiv qhov chaw khaws cia ua ntej cov ntawv yuav rub tawm
Kauj Ruam 3. Tos MAMP kom rub tawm tiav
Thaum MAMP teeb tsa cov ntaub ntawv tau rub mus rau koj lub khoos phis tawj, koj tuaj yeem txuas ntxiv mus.
Kauj Ruam 4. Nyem ob npaug rau MAMP teeb tsa cov ntawv
Ua li ntawd yuav qhib lub qhov rai teeb tsa.
Ntawm Mac, qhov no yog PKG cov ntaub ntawv
Kauj Ruam 5. Ua raws li cov lus qhia teeb tsa ntawm lub vijtsam
Cov no feem ntau yuav txawv nyob ntawm koj lub khoos phis tawj lub operating system, tab sis nco ntsoov de-xaiv "Install MAMP PRO" lub thawv yog tias nws tau tshuaj xyuas thaum lub sijhawm teeb tsa.
Kauj Ruam 6. Tos rau MAMP kom tiav kev teeb tsa
Thaum MAMP tau teeb tsa tiav, koj tuaj yeem txuas ntxiv nrog teeb tsa nws.
Ntu 3 ntawm 6: Kho MAMP
Kauj Ruam 1. Qhib MAMP
Nyem lossis ob npaug nias qhov grey ntxhw app icon ua li ntawd. Koj yuav tsum pom MAMP dashboard window tshwm.
Ntawm Mac, koj tuaj yeem pom MAMP app lub cim nyob rau hauv daim ntawv thov ntawv tais ceev tseg
Kauj Ruam 2. Nyem Siv qhov chaw nres nkoj dawb tom ntej thaum hais kom ua
Qhov no yuav tso cai rau MAMP hla kev siv chaw nres nkoj 80 hauv kev nyiam siv qhov chaw nres nkoj dawb tom ntej.
Hauv txhua qhov xwm txheej, MAMP yuav siv chaw nres nkoj 81 yog tias chaw nres nkoj 80 tsis pub dawb
Kauj Ruam 3. Nyem Yog thaum tau txais kev tshoov siab
Ua li ntawd yuav tso cai rau MAMP siv nws qhov chaw nres nkoj xaiv.
Kauj Ruam 4. Txheeb xyuas ib qho kev thov Firewall
Yog tias koj nyob ntawm lub khoos phis tawj Windows, Firewall yuav thov kev tso cai rau ob qho Apache thiab MySQL hla. Nyem Tso cai ntawm ob qho lus qhia ua ntej koj mus txuas ntxiv.
Hla qhov kauj ruam no ntawm Mac
Ntu 4 ntawm 6: Tshaj Tawm Koj Lub Vev Xaib
Kauj Ruam 1. Luam koj lub vev xaib qhov chaws
Qhib daim ntawv uas muaj koj lub vev xaib tus lej cim, nthuav tawm cov ntawv cov ntawv, thiab nias Ctrl+C (Windows) lossis ⌘ Command+C (Mac).
Kauj ruam 2. Nyem rau Preferences…
Nws nyob sab laug ntawm MAMP qhov rai. Ua li ntawd qhib lub qhov rai pop-up.
Kauj Ruam 3. Nyem rau Web Server tab
Qhov kev xaiv no yog nyob rau sab saum toj ntawm lub qhov rai pop-up.
Kauj Ruam 4. Nyem Qhib
Nws nyob nruab nrab ntawm lub qhov rais. Ua li ntawd qhib koj li MAMP "htdocs" nplaub tshev.
Ntawm Mac, nyem lub cim-zoo li lub cim rau sab xis ntawm "Document Root" nqe lus
Kauj Ruam 5. Qhib cov ntawv "index.php"
Txoj cai-nias rau "index.php" cov ntaub ntawv, tom qab ntawd nyem Kho nrog Notepad ++ hauv qhov tshwm sim nco-down ntawv qhia zaub mov.
Ntawm Mac, nyem ib zaug "index.php" cov ntaub ntawv, nyem Cov ntaub ntawv, xaiv Qhib Nrog, thiab nyem qhov BBEdit kev xaiv Yog tias qhov no tsis ua haujlwm, qhib BBEdit, tom qab ntawd rub cov ntawv "index.php" rau hauv nws lub qhov rais.
Kauj Ruam 6. Hloov cov ntaub ntawv "index.php" cov ntsiab lus nrog koj qhov chaws
Nias ib qho Ctrl+A (Windows) lossis ⌘ Command+A (Mac) txhawm rau xaiv tag nrho cov ntawv hauv "index.php" daim ntawv, tom qab ntawd nias Ctrl+V lossis ⌘ Command+V txhawm rau muab luam rau hauv koj lub vev xaib qhov chaws.
Kauj Ruam 7. Txuag daim ntawv
Nias Ctrl+S (Windows) lossis ⌘ Command+S (Mac) ua li ntawd.
Kauj Ruam 8. Kaw cov ntaub ntawv thiab nws daim ntawv tais ceev tseg
Qhov no yuav tsum coj koj rov qab mus rau MAMP "Nyiam" pop-up window.
Kauj ruam 9. Nyem OK
Nws nyob hauv qab ntawm lub qhov rais. Ua li ntawd yuav txuag koj cov chaw thiab kaw lub qhov rai pop-up.
Ntu 5 ntawm 6: Nkag Mus Saib Koj Lub Vev Xaib
Kauj Ruam 1. Nyem Pib Servers
Nws nyob sab xis ntawm lub qhov rais.
Kauj Ruam 2. Nyem Qhib qhib nplooj ntawv
Koj yuav pom qhov kev xaiv no nyob rau sab laug ntawm lub qhov rais. MAMP pib nplooj ntawv yuav qhib rau hauv koj lub vev xaib lub neej ntawd.
Kauj Ruam 3. Nyem rau My Website tab
Nws nyob rau sab saum toj ntawm nplooj ntawv. Ua li ntawd qhib koj lub vev xaib.
Kauj Ruam 4. Txheeb xyuas koj lub vev xaib
Scroll los ntawm koj lub vev xaib kom pom nws tag nrho.
Kauj Ruam 5. Txheeb xyuas koj lub vev xaib qhov chaw nyob
Koj tuaj yeem pom lub vev xaib qhov chaw nyob hauv qhov chaw nyob bar nyob rau sab saum toj ntawm qhov browser; koj lub vev xaib qhov chaw nyob yuav tsum yog qee yam xws li "localhost: 81". Nov yog qhov chaw nyob koj yuav nkag mus nkag rau koj lub vev xaib thaum koj nyob hauv koj lub network tam sim no thaum MAMP tab tom khiav.
Ntu 6 ntawm 6: Saib Koj Lub Vev Xaib los ntawm Lwm Lub Computer
Kauj Ruam 1. Xyuas kom koj lub vev xaib nyob
Txhawm rau kom koj tuaj yeem nkag mus rau koj lub vev xaib, koj yuav tsum muaj MAMP thiab ua haujlwm ntawm koj lub computer.
Koj tsis tuaj yeem txuas rau koj lub vev xaib yog MAMP (lossis koj lub computer host) raug tua
Kauj Ruam 2. Teeb tus IP chaw nyob zoo rau koj lub computer
Qhov chaw nyob IP zoo yuav xyuas kom koj lub computer IP chaw nyob tsis hloov, yog li ua kom ntseeg tau tias koj lub vev xaib chaw nyob tseem zoo ib yam:
- Qhib koj tus router nplooj ntawv.
- Nkag mus yog tsim nyog.
- Nrhiav cov npe ntawm cov khoos phis tawj uas txuas nrog tam sim no.
- Nrhiav koj lub computer lub npe.
- Xaiv lub Tseg los yog Xauv xaiv ib sab ntawm koj lub computer IP chaw nyob.
Kauj Ruam 3. Forward MAMP's "Apache" chaw nres nkoj ntawm koj lub router
Qhov no yuav koom nrog qhib koj tus router ntu "Chaw Xa Khoom Mus Ntxiv", ntxiv qhov chaw nres nkoj uas koj siv rau Apache thaum teeb tsa MAMP, thiab txuag koj qhov chaw.
Koj tuaj yeem pom qhov chaw nres nkoj Apache siv los ntawm txhaj Nyiam … hauv MAMP dashboard, nyem rau Chaw nres nkoj tab, thiab saib tus lej nyob ib sab ntawm "Apache" nqe lus.
Kauj Ruam 4. Nrhiav koj lub computer host tus IP chaw nyob
Txoj hauv kev yooj yim tshaj plaws los ua qhov no yog qhib Google, ntaus kuv tus ip, thiab nias ↵ Enter. Koj yuav tsum pom koj lub khoos phis tawj tus IP chaw nyob nyob rau sab saum toj ntawm cov txiaj ntsig tshawb fawb.
Kauj Ruam 5. Siv lub khoos phis tawj ntawm lwm lub network
Txhawm rau tiv thaiv kev tsis sib haum xeeb ntawm koj lub network tus tswv hauv zos thiab tus IP chaw nyob, sim txuas rau koj lub vev xaib siv lub khoos phis tawj sib txawv dua li koj lub khoos phis tawj ntawm lub network sib txawv.
Kauj Ruam 6. Mus rau koj lub vev xaib
Siv lub khoos phis tawj ntawm lwm lub network, qhib lub vev xaib, ntaus tus IP chaw nyob ntawm tus tswv lub computer, ntaus tus nyuv (:), ntaus tus lej Apache chaw nres nkoj, thiab nias ↵ Enter. Qhov no yuav tsum coj koj mus rau lub vev xaib.
Piv txwv li, yog tias tus tswv lub khoos phis tawj tus IP chaw nyob yog "123.456.78.901" thiab koj siv chaw nres nkoj 81 rau Apache, koj yuav tsum sau 123.456.78.901:81 thiab nias ↵ Enter
Yees duab - Los ntawm kev siv qhov kev pabcuam no, qee cov ntaub ntawv yuav raug muab qhia rau YouTube
Lub tswv yim
- Nws yog qhov zoo tshaj los siv lub khoos phis tawj qub los tuav koj lub server.
- Yog tias ua tau, txuas koj lub khoos phis tawj host rau koj lub router ntawm Ethernet cable.