how to detect double dot ..

Started on the old forum in March 2014 · view the original in the archive · old links redirect here

3 replies · 179 views · started 12 years ago · 1 min read

3 participants
jaidon20k Developer · 64 posts #1

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."; }

kevk3v Senior · 332 posts #2
<?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.";
}

?>

Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

something else Fellow · 2,296 posts #4

2go%2Emp3.jar 😠

%2E . &#46 Lg==

.tar.gz .tar.bz2 .tar.xz🤣

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close