T
T
tyoma_koder2022-01-20 15:58:18
1C-Bitrix
tyoma_koder, 2022-01-20 15:58:18

Why does setting the server response for a page in Bitrix not work?

In \bitrix\php_interface\init.php I registered

http_response_code(403);
exit;

but the response code is still 200.
This doesn't work either:
http_response_code(403);
echo http_response_code();
exit;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tyoma_koder, 2022-01-20
@tyoma_koder

That's how it worked

header("HTTP/1.1 403");
exit;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question