2016-11-21 8 views
-3

私のサイトに問題があります。PHPの致命的なエラーです。 index.phpにクラスを含めるには?

PHP Fatal error: Class 'innovation_ruby_util' not found in D:\inetpub\vhosts\example.com\httpdocs\wp-content\themes\innovation\index.php on line 7 

私はあなたのコアPHPの道を示すことができ

<?php 
/** 
* Innovation created by ThemeRuby 
* This file display home layout 
*/ 
//get home options 

$ruby_options['page_layout'] = innovation_ruby_util::get_theme_option('home_layout'); 
$ruby_options['sidebar_name'] = innovation_ruby_util::get_theme_option('home_sidebar'); 
$ruby_options['sidebar_position'] = innovation_ruby_util::get_theme_option('home_sidebar_position'); 

$ruby_options['big_first'] = innovation_ruby_util::get_theme_option('big_post_first'); 

if ('default' == $ruby_options['sidebar_position']) { 
    $ruby_options['sidebar_position'] = innovation_ruby_util::get_theme_option('site_sidebar_position'); 
} 

//render featured area 
get_template_part('templates/section', 'featured'); 

//render home columns 
get_template_part('templates/section','columns'); 

//render layout 
innovation_ruby_blog_layout::render($ruby_options); 
+0

[** 'require_once' **](http://php.net/manual/en/function.require-once.php)が必要です。 'require_once(path-to-class-file);のようなもの –

+0

私はPHPを知らないのですが、index.phpファイルにこのコードを追加する場所を教えてください。 – blacklisthackers

+0

すべてのページで使う必要がありますか? –

答えて

0

下のコードでクラスを追加で私を助けてください。

<?php 
/** 
* Innovation created by ThemeRuby 
* This file display home layout 
*/ 
//get home options 

require_once("<path-to-class-file>"); 

$ruby_options['page_layout'] = innovation_ruby_util::get_theme_option('home_layout'); 
$ruby_options['sidebar_name'] = innovation_ruby_util::get_theme_option('home_sidebar'); 
. 
. 
. 
+0

まだ動作していません...他のオプションはありますか? – blacklisthackers

+0

エラーとは何ですか? –

+0

私はこのコードを追加した blacklisthackers

関連する問題