Created
April 10, 2013 12:55
-
-
Save gibbs/5354355 to your computer and use it in GitHub Desktop.
Get the installed version of Drupal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get Drupal 7 current version | |
*/ | |
$version = NULL; | |
$version_file = 'includes/bootstrap.inc'; | |
// Path to installation | |
$install_path = '/home/user/website.com/public_html'; | |
$file = realpath($install_path . '/' . $version_file); | |
include_once $file; | |
$version = defined('VERSION') ? VERSION : FALSE; | |
echo $version; | |
//return VERSION; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment