how to detect double dot ..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    solved how to detect double dot ..

    pls how can i know/detect if a file have more than a dot?

    E.g $file = "2go.mp3.jar";
    if(checkdot($file) == "yes")
    {
    echo "more than one dot in $file, pls rename, remove dot and leave the last dot alone.";
    }

    #2
    PHP Code:
    <?php

    function checkdot($file) {
        if(
    substr_count($file,'.')>1)
           return 
    true;
        else
           return 
    false;
    }

    if(
    checkdot($filename))
    {
    echo 
    "More than one dot in $file, pls rename, remove dot and leave the last dot alone.";
    }

    ?>
    Last edited by kevk3v; 25.03.14, 16:28.
    Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

    Comment


      #3
      thanks. You too much!!!

      Comment


        #4
        2go%2Emp3.jar

        %2E
        &#x2E;
        &#46
        Lg==

        .tar.gz .tar.bz2 .tar.xz
        Last edited by something else; 19.04.14, 15:46.

        Comment

        Working...
        X