PHP's Shortest HTTP response code

Source: Internet
Author: User
Tags response code

Just found in CodeProject sent me an article called: the shortest PHP code for returning HTTP Response code The translation is (PHP shortest HTTP response code) the author used 13 examples to find the shortest HTTP response code, of which five is not successful, the following is what I cut in this article:

Header("http/1.1 404");//WorksHeader("HTTP/1 404");//WorksHeader("http/404");//WorksHeader("HTTP 404");//doesn ' t work, returns OKHeader("http/1.1", 0,404);//doesn ' t work, returns OKHeader("HTTP/1", 0,404);//doesn ' t work, returns OKHeader("http/", 0,404);//doesn ' t work, returns OKHeader("HTTP", 0,404);//WorksHeader("", 0,404);//doesn ' t work, returns OKHeader("/", 0,404);//WorksHeader("1", 0,404);//WorksHeader(1,0,404);//WorksHeader(0,0,404);//Works

So shortest Code is:

Header (0,0,404);

PHP's Shortest HTTP response code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.