php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "magic file"

How can PHP functions like ref.mime-magic and ref.fileinfo help in ensuring file security?

PHP functions like ref.mime-magic and ref.fileinfo can help in ensuring file security by allowing us to determine the actual file type of an uploaded...

How can the __DIR__ magic constant be used effectively in PHP file inclusion?

When including files in PHP, using the __DIR__ magic constant can help ensure that the path to the included file is always correct, regardless of the...

What are the implications of the magic-quotes-gpc and magic-quotes-runtime settings in PHP on handling slashes?

The magic-quotes-gpc and magic-quotes-runtime settings in PHP automatically add slashes to incoming data from forms, which can lead to double escaping...

How can the magic constant __FILE__ be used to determine the directory of a specific file in PHP?

The magic constant __FILE__ in PHP represents the full path and filename of the current file. By using this constant in combination with other PHP fun...

How can the __DIR__ magic constant be used to improve file inclusion in PHP scripts?

When including files in PHP scripts, it's important to consider the directory structure to ensure that the correct path is used. The __DIR__ magic con...

Showing 1 to 5 of 10000 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 1999 2000 ›
PHP.ORG

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

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.