How can I know which version of Drupal is installed in my server?
This is defined as a global PHP variable in /includes/bootstrap.inc within D7. Example: define('VERSION', '7.14'); So use it like this...
/includes/bootstrap.inc
define('VERSION', '7.14');
if (VERSION >= 7.1) { do_something(); }