Kev Sau Npe Rau Cov Neeg Siv Ntawm Lub Xaib

Cov txheej txheem:

Kev Sau Npe Rau Cov Neeg Siv Ntawm Lub Xaib
Kev Sau Npe Rau Cov Neeg Siv Ntawm Lub Xaib

Video: Kev Sau Npe Rau Cov Neeg Siv Ntawm Lub Xaib

Video: Kev Sau Npe Rau Cov Neeg Siv Ntawm Lub Xaib
Video: Hnub nyug zoo thiab tsis zoo lub 9 hli 2021 | Hnub Nyug 2024, Kaum ib hlis
Anonim

Kev sau npe yog xav tau los qhib qee cov ntsiab lus rau qee tus neeg siv tsawg, tswj cov lus los ntawm spammers, thiab pab kom lawv mus yuav khoom hauv khw hauv online. Kev cuv npe hauv lub vev xaib tuaj yeem tsim nrog kev txawj ntse nkag mus lossis siv cov cai npaj muaj.

Kev sau npe rau cov neeg siv ntawm lub xaib
Kev sau npe rau cov neeg siv ntawm lub xaib

Cov Lus Qhia

Kauj ruam 1

Mechanism kev tsim kev sau npe hauv php. Ua daim ntawv rau npe ntawm nplooj ntawv tseem ceeb (index.php) siv html markup lus. Txuas rau nplooj ntawv php nrog cov ntaub ntawv sau npe (piv txwv, hu ua Registration.php). Los ntawm txhaj rau "Sau npe" khawm, tus neeg siv yuav raug coj mus rau nplooj ntawv no, qhov chaw uas nws yuav tsum sau nws cov ntaub ntawv hauv cov foos. Tus ID nkag mus, tus password, email chaw nyob yuav muab xa mus rau tus tuav tsim hauv php. Tom qab ua tiav, lawv yuav nkag mus rau hauv cov ntaub ntawv thiab cov ntawv sau npe yuav ua tiav.

Kauj ruam 2

Tus lej zais (encrypted) yuav tsum muab khaws cia rau hauv mysql database. Tsim cov lus tshiab hauv cov hauv database, piv txwv, hu ua cov neeg siv cov ntaub ntawv. Tsim bd.php ntawv uas yuav siv los txuas rau lub hauv paus. Qhov txuas txuas rau cov ntawv no yuav tsum tau sau npe ntawm cov nplooj ntawv ua ntej pib qhov html code.

Kauj ruam 3

Ua ib daim ID nkag mus rau ntawm nplooj ntawv tseem ceeb (thiab lwm tus), nrog rau daim teb rau kev nkag mus ntawm tus username thiab password. Thaum tus neeg siv nkag mus rau cov ntaub ntawv thiab nyem lub pob "Login", cov ntaub ntawv no yuav xa mus rau login.php file rau kev ua ntaub ntawv thiab pov thawj. Yog tias txhua yam ntaus txhua tus, nws yuav sau rau hauv khoom qab zib. Tog twg los qhib yuav tau pib thiab cov ntaub ntawv yuav muab cia rau hauv qhov browser kom txog thaum koj tawm lossis kaw qhov browser. Cov ntaub ntawv tawm.php yuav yog lub luag haujlwm rau cov neeg siv tawm ntawm lub xaib. Nyem rau ntawm "Logout" khawm yuav xaus kev sib kho lossis rho tawm cov khaub noom.

Kauj ruam 4

Yog tias koj tseem tsis tau muaj zog nyob hauv lub cajmeem thiab cov lus markup, txhua yam koj xav tau yog npaj kom tau cov kab ntawv npaj thiab muab tso rau qhov chaw koj xav tau. Koj tuaj yeem nqa nws nyob rau ib qho twg lossis siv tus qauv tsim tsa xws li MyTaskHelper.ru cov kev pabcuam. Hauv qhov no, txuj ci kev txawj ntse tsis xav tau. Sau npe, tsim daim ntawv nrog cov teb koj xav tau, muab lawv cov npe yam xav tau, kho lawv rau hauv koj nyiam. Kho kom zoo nkauj (qauv) ntawm daim ntawv siv cov qauv "Widgets". Cov kev pabcuam yuav ua kom tsim qauv daim ntawv nws tus kheej, theej nws rau ntawm nplooj ntawv xav tau.

Pom zoo: