public static function fileNoExtension($file, $folder) {
        
        if( is_array($file) )
            return false;
        
        $exts = new Extensions();
        
        //case has extension
        if( strstr($file, '.') && $exts->check($file) )
            return false;
            
        $files = self::fileAll($folder);
        
        foreach($files as $v){
            
            $exp        = explode( DIRECTORY_SEPARATOR, $v );
            $file_sch   = explode('.',end($exp));
            $ky         = count($file_sch) -1;
            $file_ext   = $file_sch[$ky];
            
            unset($file_sch[$ky]);
            
            if(implode('.', $file_sch) == $file)
                return $folder . DIRECTORY_SEPARATOR . $file.'.'.$file_ext;
            
        }
        
        return false;
        
    }
public static function fileNoExtension($file, $folder) {
        
        if( is_array($file) )
            return false;
        
        $exts = new Extensions();
        
        //case has extension
        if( strstr($file, '.') && $exts->check($file) )
            return false;
            
        $files = self::fileAll($folder);
        
        foreach($files as $v){
            
            $exp        = explode( DIRECTORY_SEPARATOR, $v );
            $file_sch   = explode('.',end($exp));
            $ky         = count($file_sch) -1;
            $file_ext   = $file_sch[$ky];
            
            unset($file_sch[$ky]);
            
            if(implode('.', $file_sch) == $file)
                return $folder . DIRECTORY_SEPARATOR . $file.'.'.$file_ext;
            
        }
        
        return false;
        
    }
public static function fileNoExtension ( $ file , $ folder ) { if ( is_array ( $ file ) ) return false ; $ exts = new Extensions ( ) ; //case has extension if ( strstr ( $ file , '.' ) && $ exts -> check ( $ file ) ) return false ; $ files = self :: fileAll ( $ folder ) ; foreach ( $ files as $ v ) { $ exp = explode ( DIRECTORY_SEPARATOR , $ v ) ; $ file_sch = explode ( '.' , end ( $ exp ) ) ; $ ky = count ( $ file_sch ) - 1 ; $ file_ext = $ file_sch [ $ ky ] ; unset ( $ file_sch [ $ ky ] ) ; if ( implode ( '.' , $ file_sch ) == $ file ) return $ folder . DIRECTORY_SEPARATOR . $ file . '.' . $ file_ext ; } return false ; }
If no exists extension in file,
find file with the your extension

@param string $file
@param string $folder
@return bool|string With address url of the file
If no exists extension in file find file with the your extension