cvs: /php4/ext/standard basic_functions.c head.c head.h

From: Date: Tue, 20 Jul 1999 14:03:27 +0000
Subject: cvs: /php4/ext/standard basic_functions.c head.c head.h
Groups: php.version4 
Request: Send a blank email to php-version4+get-2317@lists.php.net to get a copy of this message
andrey Tue Jul 20 14:03:27 1999 EDT Modified files: /php4/ext/standard basic_functions.c head.c head.h Log: Added headers_sent() function Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.47 php4/ext/standard/basic_functions.c:1.48 --- php4/ext/standard/basic_functions.c:1.47 Sat Jul 17 15:23:32 1999 +++ php4/ext/standard/basic_functions.c Tue Jul 20 14:03:27 1999 @@ -284,6 +284,7 @@ PHP_FE(print_r, NULL) {"setcookie", php3_SetCookie, NULL}, {"header", php3_Header, NULL}, + PHP_FE(headers_sent, NULL) PHP_FE(function_exists, NULL) PHP_FE(in_array, NULL) PHP_FE(extract, NULL) Index: php4/ext/standard/head.c diff -u php4/ext/standard/head.c:1.14 php4/ext/standard/head.c:1.15 --- php4/ext/standard/head.c:1.14 Fri Jul 16 09:12:56 1999 +++ php4/ext/standard/head.c Tue Jul 20 14:03:27 1999 @@ -15,7 +15,7 @@ | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ -/* $Id: head.c,v 1.14 1999/07/16 13:12:56 zeev Exp $ */ +/* $Id: head.c,v 1.15 1999/07/20 18:03:27 andrey Exp $ */ #include <stdio.h> #include "php.h" @@ -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 @@ } } +PHP_FUNCTION(headers_sent) +{ + SLS_FETCH(); + + if (SG(headers_sent)) { + RETURN_TRUE; + } else { + RETURN_FALSE; + } +} function_entry php3_header_functions[] = { {NULL, NULL, NULL} Index: php4/ext/standard/head.h diff -u php4/ext/standard/head.h:1.6 php4/ext/standard/head.h:1.7 --- php4/ext/standard/head.h:1.6 Sun May 16 07:19:26 1999 +++ php4/ext/standard/head.h Tue Jul 20 14:03:27 1999 @@ -55,6 +55,7 @@ extern int php3_init_head(INIT_FUNC_ARGS); PHP_FUNCTION(Header); PHP_FUNCTION(SetCookie); +PHP_FUNCTION(headers_sent); void php4i_add_header_information(char *header_information, uint header_length);

« previous php.version4 (#2317) next »