Qhov yuav tsum tau hloov cov hlua kuj sib txawv ntawm cov vev xaib tshwm sim ntau zaus. Qhov no yuav tsim nyog tsis yog rau kev ua haujlwm nrog cov passwords lossis lwm cov ntaub ntawv ntiag tug. Piv txwv, feem ntau nws yooj yim dua rau encryption html code uas yuav tsum tau khaws cia rau hauv cov ntawv, chaw khaws ntaub ntawv lossis kua nplaum ntau dua los npaj nws kom tshem tag nrho cov txwv tsis pub ua ntej sau ntawv, thiab tom qab ntawd rov kho lawv tom qab nyeem. Hauv qab no yog ib qho ntawm cov kev xaiv rau kev hloov cov kab sib txawv ntawm cov hlua siv cov lus PHP.
Cov Lus Qhia
Kauj ruam 1
Siv PHP's built-in base64_encode muaj nuj nqi rau qhov encode cov tsiaj ntawv hloov. Nws muaj tsuas yog ib qho kev ntsuas uas yuav tsum dhau los - tus nqi ntawm cov ntawv sib txawv encrypted. Piv txwv li, PHP code uas yuav tsim tawm lub hauv paus rau 64 MIME encoded ntawv "xaim hlua" mus rau nplooj ntawv yuav zoo li no:
Cov ntawv sau tseem yuav zoo li no: "5 + D46PTw7uLg7e3g / yDx8vDu6uA =".
Kauj ruam 2
Siv tus lej ua haujlwm hauv base64_decode los txiav txim ntawm base64 MIME tshaj tawm cov hlua hloov tau. Txoj haujlwm no tseem muaj qhov tsuas yog xav tau xwb. Piv txwv, los txiav txim siab thiab tso cov code tau txais hauv qib dhau los, koj tuaj yeem siv kab hauv qab no hauv PHP:
Kauj ruam 3
Siv lub vev xaib yog tias koj xav tau encode ib lo lus lossis sim ib zaug, lossis yog tias koj tsis tuaj yeem siv PHP scripts. Piv txwv, los ntawm kev mus rau nplooj ntawv https://tools4noobs.com/online_php_functions/base64_encode nkag mus rau lo lus xav tau lossis cov ntawv sau hauv daim teb nkaus xwb thiab nyem rau lub npov uas sau tias Base 64 encode. Tsab ntawv ntawm tus neeg rau zaub mov yuav tau txais cov ntaub ntawv nkag, siv lub hauv paus base_code ua haujlwm rau nws thiab muab tus nqi encode tso rau hauv ib qho chaw ntxiv. Hauv nws, txoj hlua encrypted tuaj yeem theej tawm thiab siv tau raws li koj qhov kev txiav txim siab. Yog tias xav tau decryption, koj tuaj yeem siv cov kev pabcuam zoo sib xws hauv lub vev xaib uas yuav siv tau lub hauv paus kev ua haujlwm 64 rau tus nqi koj ntaus. Nyob rau ntawm nplooj ntawv no nyob rau ntawm no