mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Added headers_sent() function
This commit is contained in:
parent
f8fdee1c66
commit
2d1b6f0801
3 changed files with 13 additions and 0 deletions
|
@ -284,6 +284,7 @@ function_entry basic_functions[] = {
|
||||||
PHP_FE(print_r, NULL)
|
PHP_FE(print_r, NULL)
|
||||||
{"setcookie", php3_SetCookie, NULL},
|
{"setcookie", php3_SetCookie, NULL},
|
||||||
{"header", php3_Header, NULL},
|
{"header", php3_Header, NULL},
|
||||||
|
PHP_FE(headers_sent, NULL)
|
||||||
PHP_FE(function_exists, NULL)
|
PHP_FE(function_exists, NULL)
|
||||||
PHP_FE(in_array, NULL)
|
PHP_FE(in_array, NULL)
|
||||||
PHP_FE(extract, NULL)
|
PHP_FE(extract, NULL)
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "head.h"
|
#include "head.h"
|
||||||
#include "post.h"
|
#include "post.h"
|
||||||
|
#include "SAPI.h"
|
||||||
#ifdef TM_IN_SYS_TIME
|
#ifdef TM_IN_SYS_TIME
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#else
|
#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[] = {
|
function_entry php3_header_functions[] = {
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
|
|
|
@ -55,6 +55,7 @@ extern php3_module_entry php3_header_module_entry;
|
||||||
extern int php3_init_head(INIT_FUNC_ARGS);
|
extern int php3_init_head(INIT_FUNC_ARGS);
|
||||||
PHP_FUNCTION(Header);
|
PHP_FUNCTION(Header);
|
||||||
PHP_FUNCTION(SetCookie);
|
PHP_FUNCTION(SetCookie);
|
||||||
|
PHP_FUNCTION(headers_sent);
|
||||||
|
|
||||||
void php4i_add_header_information(char *header_information, uint header_length);
|
void php4i_add_header_information(char *header_information, uint header_length);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue