How to secure the php code?

前端 未结 5 1701
臣服心动
臣服心动 2021-01-24 17:19

I created now a Javascript Code that get the php variable into javascript code, my issue that the php variable is important and I don\'t want any can see this variable is there

5条回答
  •  忘掉有多难
    2021-01-24 17:45

    People will only see the value of the variable. They wont know what it is or how important it is supposed to be. Nobody will see the variable name because the PHP code is executed BEFORE the page is sent to the client. Therefore there is no need to obfuscate the value, and you cant anyway since you need the value.

    An example. if I use this PHP code in my file

    Hello Mr

    the only thing people will be able to see in the source when the page loads is

    Hello Mr Bond

    The same rule applies if it is placed in Javascript

提交回复
热议问题