Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/237.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php头安全音乐会何时使用?_Php_Security - Fatal编程技术网

Php头安全音乐会何时使用?

Php头安全音乐会何时使用?,php,security,Php,Security,使用此功能时,我应该担心什么安全性?基本上,只要您不允许任何用户提供的内容进入标题,您应该是安全的。以什么方式?“安全性”是一个巨大的话题,如果没有细节,这样的问题就无法得到合理的回答。很久以前,这个函数容易受到CRLF注入的攻击,但除此之外,print()和echo()函数在安全性方面要危险得多。 header(string,replace,http_response_code); * string Required. Specifies the header string to s

使用此功能时,我应该担心什么安全性?

基本上,只要您不允许任何用户提供的内容进入标题,您应该是安全的。

以什么方式?“安全性”是一个巨大的话题,如果没有细节,这样的问题就无法得到合理的回答。很久以前,这个函数容易受到CRLF注入的攻击,但除此之外,print()和echo()函数在安全性方面要危险得多。
 header(string,replace,http_response_code);

  * string  Required. Specifies the header string to send
  * replace Optional. Indicates whether the header should replace previous or add a second header. Default is TRUE (will replace). FALSE (allows multiple headers of the same type)
  * http_response_code      Optional. Forces the HTTP response code to the specified value (available in PHP 4.3 and higher)