summaryrefslogtreecommitdiff
path: root/ext/standard/head.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>1999-07-20 18:03:27 +0000
committerAndrey Hristov <andrey@php.net>1999-07-20 18:03:27 +0000
commit2d1b6f08017a7a5733280835b4cfa94c8acfd56c (patch)
treef6fd6acfbd7ec2aa235564a36f121ca054b40a7c /ext/standard/head.c
parentf8fdee1c66db32db3af4a3af321938d59a69ef4f (diff)
downloadphp-git-2d1b6f08017a7a5733280835b4cfa94c8acfd56c.tar.gz
Added headers_sent() function
Diffstat (limited to 'ext/standard/head.c')
-rw-r--r--ext/standard/head.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/standard/head.c b/ext/standard/head.c
index f1bd0dcdc8..cfc6930f7d 100644
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@ -24,6 +24,7 @@
#include "main.h"
#include "head.h"
#include "post.h"
+#include "SAPI.h"
#ifdef TM_IN_SYS_TIME
#include <sys/time.h>
#else
@@ -556,6 +557,16 @@ int php3_headers_unsent(void)
}
}
+PHP_FUNCTION(headers_sent)
+{
+ SLS_FETCH();
+
+ if (SG(headers_sent)) {
+ RETURN_TRUE;
+ } else {
+ RETURN_FALSE;
+ }
+}
function_entry php3_header_functions[] = {
{NULL, NULL, NULL}