Results 1 to 4 of 4

Thread: What is inside PHP Header file

  1. #1
    Join Date
    Apr 2008
    Posts
    240

    What is inside PHP Header file

    I know that every header file contains the information about itself, its methods, version number and so on, but what the PHP header function contains inside it, Please let me know as I also need to mention in my PHP header file.

  2. #2
    Join Date
    Jan 2009
    Posts
    140

    Re: What is inside PHP Header file

    In commons header() being used for page redirection whereby a specific location being define. However header() can be use more than just that. PHP has around hundreds of inbuilt for functions which makes it a very powerful language. A function is a group of statements that can be executed any time you want. ALL functions in PHP start with function(). These functions can also accept parameters. header() may also be use for page authentication assigning content type cache control etc.

  3. #3
    Join Date
    Feb 2006
    Posts
    185

    Re: What is inside PHP Header file

    The header() function sends a raw HTTP header to a client.We can use herder() function for redirection of pages. It is important to notice that header() must be called before any actual output is seen. The reason for this problem is that headers is the first thing sent out by a page so you shouldn’t output anything before the header function(not even a html tag). But sometimes its hard to avoid that in situations where you have a login form and on the submission of form you want to verify the user and then redirect him.

  4. #4
    Join Date
    Dec 2008
    Posts
    202

    Re: What is inside PHP Header file

    The main use of header() is to send header information into client machine and its one of the use is Page redirect we have a lot of directives for this function for Eg. Location. At the top of your php file in which you are using header redirect call the function ob_start() while output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer. There are other Different arguments in php header function:-

    The header() function sends a raw HTTP header to a client.

    Syntax:
    header(string,replace,http_response_code)

Similar Threads

  1. File Path insert on Header/Footer Office 2007
    By Allanoo in forum MS Office Support
    Replies: 1
    Last Post: 04-02-2013, 04:20 PM
  2. Connect USB 3.0 front case panel header to motherboard w/o a header?
    By Dogs-Day-Out in forum Motherboard Processor & RAM
    Replies: 4
    Last Post: 14-04-2012, 07:02 PM
  3. Replies: 6
    Last Post: 27-06-2011, 07:19 AM
  4. Replies: 3
    Last Post: 31-08-2009, 12:38 PM
  5. IIS7: Add expires header or cache-control header
    By quota in forum Software Development
    Replies: 3
    Last Post: 06-06-2009, 07:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,239,166.68974 seconds with 17 queries