answersLogoWhite

0

What is header in php?

Updated: 9/19/2023
User Avatar

Wiki User

13y ago

Best Answer

header() is a php function used to modify and set HTTP headers sent to the browser.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is header in php?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you give href toanother php page?

Here is the code below to redirect a webpage using php: <?php header('Location: url of the webpage'); // example: header('Location: index.php') exit; // exit after redirection is very important as php executes code line by line ?>


How do you create a redirect webpage?

If you are using PHP you could use this code: (In the <head>) <?php HEADER("Location: http://www.rasclerhys.com"); ?> That should automatically take you to "www.rasclerhys.com"


How do you check user is login or not in php?

// Check if $_SESSION['username'] is not blank <?php Session_start(); if ($_SESSION['username'] == "") { header('location: login.php'); } else { echo " User logged in "; } ?>


Where does one put PHP encoding type headers?

One will put PHP encoding type headers before instructions using HTML language. This is done in order to start the HTML sequence through the PHP header.


How do you redirect a url in php?

URL redirects occur when the server, ran by PHP, gives the client a new location to be at. This information is sent using a the HTTP Location header.Such a header can be sent using the header($str) function, where $strequals "Location: http://www.example.com/". This would send the client to example.com.Although uncommon, browsers can be configured to ignore location headers. Do not assume the client will always be redirected.


Why can a CSS sheet fail to work properly after converting a web page from HTML to PHP?

AnswerThe web browser cannot tell whether the page information arriving at the browser comes from a PHP source or an HTML source. So if the HTML version works and the PHP version CSS is broken you have translated the page incorrectly. Examine the page source from the browser window for both versions and compare them closely. The PHP version must reference the CSS file correctly in the header. Check that in particular. :]


What is 10 percent in Php 250?

Answer: Php 2510% of Php 250= 10% * Php 250= 0.10 * Php 250= Php 25


What is a php consultant?

PHP Consultant is a Expert PHP Developer who Guide PHP Development Process


What php command to be used to redirect visitotors to customized thank you page after submitting the form?

You should write this line of code before any text is sent to the browser. Remember, even the HTML tag counts. So you can type: <?php if (isset($_POST['submit'])) header("location:http://www.mywebsite.com/thankyou.php"); ?> Remember that if statements and other PHP statements that don't actually send output would work, but any output sent to the browser won't. Be careful of that!


What is the default extension that most Web servers use to process php scripts?

PHP files extension is .php


Is php a binary file?

No, PHP is text file with .php extension.


Will php 4.4.7 server support php 5 files?

Yes php 4.4.7 server support php 5 files. But most of the php 5 features are not supported by php 4.4.7 version