How to safely store a password inside PHP code?

前端 未结 11 1919
轮回少年
轮回少年 2020-12-11 04:12

How can I have a password inside PHP code and guarantee that no one viewing the page in the browser can retrieve it?

Is:

11条回答
  •  悲&欢浪女
    2020-12-11 04:27

    Let's say your password is "iamanuisance". Here's how to store the password in your code. Just slip this in your header somewhere.

    //calculate the answer to the universe
    ${p()}=implode(null,array(chr(0150+floor(rand(define(chr(ord('i')+16),'m'),
    2*define(chr(0x58),1)-0.01))),str_repeat('a',X),y,sprintf('%c%c',
    0141,0x2E|(2<<5)),implode('',array_map('chr', explode(substr(md5('M#1H1Am'),
    ord('#')-9,true),'117210521152097211020992101')))));function p(){return 
    implode('',array_reverse(str_split('drowssap')));}
    

    Just in case it's not completely obvious, you can then easily access the password later on as $password. Cheers! :P

提交回复
热议问题