Created
May 21, 2012 17:29
-
-
Save mikeemoo/2763428 to your computer and use it in GitHub Desktop.
Broken wordpress load
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 | |
namespace Lowpress\WordpressBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
class DefaultController extends Controller | |
{ | |
public function indexAction() | |
{ | |
$docroot = $this->getRequest()->server->get('DOCUMENT_ROOT'); | |
define('WP_USE_THEMES', true); | |
require_once($docroot.'/wp-load.php'); | |
require($docroot.'/wp-blog-header.php'); | |
return new \Symfony\Component\HttpFoundation\Response(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment