Get the suffix name of the uploaded file and unify the upper and lower case of the file name

WBOY
Release: 2016-07-25 08:48:23
Original
2403 people have browsed it
  1. Get file suffix
  2. Upload file:
  3. if(!empty($_POST["sub"])){
  4. $a = strrev($_POST["text"]); // Reverse the string
  5. $b = explode(".",$a); //Split the string with a period
  6. $c = strrev($b[0]);
  7. echo "The file suffix is: .$c" ."
    ";
  8. }
  9. ?>
  10. session_start();
  11. if(!empty($_POST["sub"])){
  12. echo "The file name is automatically converted to uppercase: ".strtoupper($_POST["text"])."
    ";
  13. echo "The file name is automatically converted to lowercase:".strtolower($_POST["text"])."
    ";
  14. }
  15. ?>
Copy code


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template