php-src/sapi/apache2filter/php_functions.c
Sascha Schumann d504de0f78 An Apache 2.0 Filter for PHP, completely from scratch.
TODO:

	POST, cookies, "flushing", finalizing config framework (it works),
	http auth, PHP Hooks (apache_sub_req is there).

Note that this code depends on some other commits which are pending.
2000-10-26 17:55:05 +00:00

24 lines
411 B
C

#include "php_apache.h"
PHP_FUNCTION(apache_sub_req)
{
zval **p1;
request_req *rr;
php_struct *ctx;
SLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &p1) == FAILURE)
WRONG_NUM_ARGS;
convert_to_string_ex(p1);
ctx = SG(server_context);
rr = ap_sub_req_lookup_uri(Z_STRVAL_PP(p1), ctx->f->r);
if (rr->status == HTTP_OK) {
ap_run_sub_req(rr);
RETURN_TRUE;
}
RETURN_FALSE;
}