I have a site created using Symfony 1.2. I am trying to integrate Wordpress 2.8.4 into it to include my blog. I followed the instructions http://www.theodo.fr/blog/2009/03/integrate-wordpress-into-symfony/ , including 2 steps in the comments http://www.theodo.fr/blog/2009/03/integrate -wordpress-into-symfony / comment-page-1 / # comment-573 . The actions.class.php file is as follows:
<?php
class sfWordpressActions extends sfActions
{
public function executeIndex(sfWebRequest $request)
{
$standard_helpers = sfConfig::get('sf_standard_helpers');
$standard_helpers = array_diff($standard_helpers, array('I18N'));
sfConfig::set('sf_standard_helpers', $standard_helpers);
define('WP_USE_THEMES', true);
chdir( dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'wordpress' );
global $wpdb;
ob_start();
require_once( 'wp-blog-header.php' );
$this->blog = ob_get_contents();
if (function_exists('is_feed') && is_feed())
{
ob_end_flush();
throw new sfStopException();
}
else
{
ob_end_clean();
}
}
}
?>
My indexSuccess.php is just
This is a test
<?php echo $blog ?>
And my wp-blog-header.php
<?php
if ( !isset($wp_did_header) ) {
$wp_did_header = true;
require_once( dirname(__FILE__) . '/wp-load.php' );
$local_global_vars = get_defined_vars();
foreach($local_global_vars as $local_name => $local_value)
{
$GLOBALS[$local_name] = $local_value;
}
unset($local_name, $local_value, $local_global_vars);
wp();
global $posts;
require_once( ABSPATH . WPINC . '/template-loader.php' );
}
Here is my problem:
, , . Symfony, Wordpress , . "require_once (" wp-blog-header.php "); actions.class.php , Wordpress. , Symfony - Wordpress. ?