php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "basename"

How can the PHP function `basename()` be used to determine the current page name?

To determine the current page name using the PHP function `basename()`, you can get the full URL of the current page using `$_SERVER['PHP_SELF']`, and...

How can the basename() function in PHP be used to extract the current page name from a URL?

To extract the current page name from a URL in PHP, you can use the basename() function along with the $_SERVER['REQUEST_URI'] variable. The basename(...

How can the basename function in PHP be used to extract the file name without the extension?

To extract the file name without the extension in PHP, you can use the `basename` function along with `pathinfo`. First, use `pathinfo` to get the fil...

What potential issue arises when using basename() with URLs containing GET variables in PHP?

When using `basename()` with URLs containing GET variables in PHP, the function may not work as expected because it only returns the last component of...

What is the significance of using basename(__FILE__, '.php') compared to str_replace() in PHP?

Using `basename(__FILE__, '.php')` is more appropriate than `str_replace()` when you want to get the base name of the current file without the file ex...

Showing 6 to 10 of 236 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 47 48 ›
PHP.ORG

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

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.