Replace file extension from string - PHP
Suppose we've file name (with extension) as part of string and while displaying to users we want to replace file extension from string.
Here's how we can do this:
Suppose we've file name (with extension) as part of string and while displaying to users we want to replace file extension from string.
Here's how we can do this:
Note: Make sure you're enabling this only on development server.
It's very common for any developers to make a mistake while developing, which will result in White Screen of Death (WSOD). WSOD is normally because PHP error reporting is turned Off.
Here's how you can enable error reporting using PHP.ini file: