How-to articles, tricks, and solutions about HEADER

correct PHP headers for pdf file download

To download a PDF file in PHP, you will need to use the appropriate HTTP headers.

How to Make a Fixed Page Header Not Overlap In-Page Anchors

On this page, we’ll demonstrate how to make a fixed header not overlap in-page anchors. For that, you’ll need CSS properties. Read the tutorial and find examples.

How to Read Request Headers in PHP

The given snippet explores how to read request readers in PHP. Read it and learn the most helpful methods of reading any request headers in PHP.

How to Redirect a Web Page with PHP

In PHP, you can use several functions to make a redirect from one web page to another. Learn how to do it accurately with W3docs.

How to Set HTTP Header to UTF-8 in PHP

If you want to learn how to set the HTTP header to UTF-8 in PHP, then read this snippet, examine and run the examples, that are demonstrated in it.

PHP generate file for download then redirect

In PHP, you can use the header() function to send a "Content-Disposition" header to prompt the user to download a file.

PHP header location-redirect doesn't work - why?

There are several reasons why a PHP header location redirect may not work:

PHP header redirect 301 - what are the implications?

A 301 redirect in PHP using the "header" function tells the browser that the page has permanently moved to a new location.