php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "filename length"

How can you extract only the filename from the $_SERVER["HTTP_REFERER"] variable in PHP?

To extract only the filename from the $_SERVER["HTTP_REFERER"] variable in PHP, you can use the basename() function. This function extracts the last c...

What is the best way to retrieve the filename of the current file in PHP?

To retrieve the filename of the current file in PHP, you can use the `basename()` function along with the `__FILE__` magic constant. `__FILE__` repres...

How can regular expressions be utilized to extract a filename from a text string in PHP?

To extract a filename from a text string using regular expressions in PHP, you can use the preg_match function with a regex pattern that matches the f...

Are there alternative methods to using PHP to retrieve the filename of the current page?

One alternative method to using PHP to retrieve the filename of the current page is to use JavaScript. By accessing the `document.URL` property in Jav...

What are some common pitfalls to avoid when trying to retrieve the PHP filename in a script?

One common pitfall when trying to retrieve the PHP filename in a script is using the $_SERVER['SCRIPT_NAME'] variable, which may not always return the...

Showing 16 to 20 of 2510 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 501 502 ›
PHP.ORG

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

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.