Wordpress get current time error on functions.php -
Wordpress get current time error on functions.php -
i want current time of wordpress, got errors, how prepare it? there way current time of wordpress?, want time wordpress using format (+gmt) , user choose, not server time.
this code
<?php require_once( '/wp-includes/functions.php' ); $format = get_option('date_format') . ' ' . get_option('time_format'); print date_i18n($format, current_time('timestamp')); ?> these errors
notice: utilize of undefined constant abspath - assumed 'abspath' in c:\xampp1\htdocs\wp\wp-includes\functions.php on line 8 notice: utilize of undefined constant wpinc - assumed 'wpinc' in c:\xampp1\htdocs\wp\wp-includes\functions.php on line 8 warning: require(abspathwpinc/option.php): failed open stream: no such file or directory in c:\xampp1\htdocs\wp\wp-includes\functions.php on line 8 fatal error: require(): failed opening required 'abspathwpinc/option.php' (include_path='.;c:\xampp1\php\pear') in c:\xampp1\htdocs\wp\wp-includes\functions.php on line 8
you don't need include require_once( '/wp-includes/functions.php' );. straight utilize function homecoming gmt time below
<?php echo current_time( 'mysql', 1 ); ?> for more please refer link http://codex.wordpress.org/function_reference/current_time
wordpress
Comments
Post a Comment