Hướng dẫn php strip trailing character
I have some URLs, like Show Nội dung chính
trejder 16.7k26 gold badges118 silver badges210 bronze badges asked Mar 6, 2010 at 13:59 0 Simple and works across both Windows and Unix:
answered Apr 13, 2015 at 11:02 Dario FumagalliDario Fumagalli 9141 gold badge15 silver badges21 bronze badges 2 I came here looking for a way to remove trailing slash and redirect the browser, I have come up with an answer that I would like to share for anyone coming after me:
The answered Dec 6, 2015 at 5:24 1
answered Mar 6, 2010 at 14:23 ghostdog74ghostdog74 313k55 gold badges252 silver badges339 bronze badges 4 Not the answer you're looking for? Browse other questions tagged php or ask your own question.PHP String: Exercise-21 with SolutionWrite a PHP script to remove trailing slash from a string. Original String : 'The quick brown fox jumps over the lazy dog///' Pictorial Presentation: Sample Solution: PHP Code:
Sample Output: The quick brown fox jumps over the lazy dog Flowchart : PHP Code Editor: Have another way to solve this solution? Contribute your code (and comments) through Disqus. Previous: Write a PHP script to remove part of a
string. What is the difficulty level of this exercise? Test your Programming skills with w3resource's quiz. PHP: Tips of the DayPHP: How to get the file extension in PHP? No need to use string functions. You can use something that's actually designed for what you want: pathinfo(): $path = $_FILES['image']['name']; $ext = pathinfo($path, PATHINFO_EXTENSION); Ref : https://bit.ly/31VUJzu
|