How to cut extension from the file name?
The question was asked: 6 years 9 months ago views: 7
How to cut extension from the file name? for example, the file is called restore.php so we need to cut the "php" and withdraw.
We advise you to use all of the solution c
Answered: Rjazhenka 23-04-2015 в 07:52:35
UPD: the Second option:
Answered: kite 21-06-2012 в 12:36:45
@KiTE, the file /tmp/conf.d/tra-ta-ta that will cut ? - avp 21-06-2012 в 12:41:51
I understand you cut off before the expansion and vivezli, and I need the file name and extension, you couldn't tweak the code ? - oldzas 21-06-2012 в 13:01:31
Also because of the problem with a normal (for *nix) names, because any character except '/' and '.' can be in the extension. Ie the regular season dB. some other. It should be mapped to the rightmost point and all but the '/' after this point. - avp 21-06-2012 в 13:07:42
@avp, Yes, you are right. Then, as an option,
Answered: user280431 26-08-2018 в 09:37:27
Discover the magical world pathinfo -- and immediately eliminate the need to create their own bikes. - A K 26-08-2018 в 11:42:54
What happens if the name of the two dots? - Эникейщик 26-08-2018 в 11:57:23
Strripos - nahodit the last occurrence of a character - user280431 27-08-2018 в 12:11:54