|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-12-28 23:02 UTC] kalle@php.net
-Status: Open
+Status: Feedback
[2014-12-28 23:02 UTC] kalle@php.net
[2015-01-11 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 14:00:01 2025 UTC |
Description: ------------ I want to get the response headers, but I get a notice error. I open the file with file_get_contents, but the $http_response_header is empty Test script: --------------- <?php Class core { var $error = FALSE; function call($string) { if (!file_exists($string)) { @file_get_contents($string); if ($http_response_header != "HTTP/1.1 200 OK") { return $error = $http_response_header; } } else { return header("Location:".$string); } } ?> Expected result: ---------------- I expect a http_responde, like HTTP/1.1 200 OK Actual result: -------------- A Notice error when I echo the HTTP/1.1 200 OK