What exactly does the PHP function “test_input()” do?

前端 未结 4 628
夕颜
夕颜 2021-02-04 11:01

I know I will be voted down for this, but I need to ask. What does the code below mean? Specifically, I am confused by

if (empty($_POST[\"comment\"])) { $comme         


        
4条回答
  •  梦谈多话
    2021-02-04 11:38

    test_input() is not a standard php function but you know you can make your own functions just like this:

    function test_input($input){
       $output = $input." Oh, I'm updated."; // Whatever process you want to make
       return $output;
    }
    

    Then you can call test_input() in your php script.

    So basically you should ask the author what this does or just search for definition of test_input().

    If you use frameworks, libraries or plugins, there are tons of non-standard functions defined and what you can is to check the document(api) or to read the source code to find out the answer.

    Perhaps you can post the whole script, maybe we can find out where test_input() is.

提交回复
热议问题