php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "$_SERVER"

How can the variables $_SERVER["PHP_AUTH_USER"] and $_SERVER["PHP_AUTH_PW"] be cleared after logging out in PHP?

When a user logs out in PHP, the variables $_SERVER["PHP_AUTH_USER"] and $_SERVER["PHP_AUTH_PW"] are not automatically cleared. To clear these variabl...

Is there a difference between using $_SERVER["HTTP_HOST"] and $_SERVER["SERVER_NAME"] to retrieve the domain name in PHP?

Yes, there is a difference between using $_SERVER["HTTP_HOST"] and $_SERVER["SERVER_NAME"] to retrieve the domain name in PHP. $_SERVER["HTTP_HOST"] r...

What are the differences between $_SERVER['HTTP_HOST'] and $_SERVER['SERVER_NAME'] in PHP, and when should each be used?

$_SERVER['HTTP_HOST'] returns the Host header that the current request was sent to, while $_SERVER['SERVER_NAME'] returns the name of the server host...

What are the potential pitfalls of using $_SERVER['HTTP_HOST'] and $_SERVER['DOCUMENT_ROOT'] in PHP scripts?

Potential pitfalls of using $_SERVER['HTTP_HOST'] and $_SERVER['DOCUMENT_ROOT'] in PHP scripts include security vulnerabilities such as header injecti...

In what situations would using $_SERVER["SERVER_NAME"] and $_SERVER["SCRIPT_NAME"] to construct the file path result in unexpected or incorrect outputs?

Using $_SERVER["SERVER_NAME"] and $_SERVER["SCRIPT_NAME"] to construct file paths can result in unexpected or incorrect outputs when the server config...

Showing 16 to 20 of 1617 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 323 324 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.