• I use this code to include some vBulletin files in my post.php

    chdir(‘../forums/’);
    require_once(‘global.php’);
    require_once(‘includes/functions_newpost.php’);

    chdir(‘../wp-admin/’);
    require_once(‘admin.php’);

    But after editing a post it does not redirect back to the WordPress admin page, it just goes to a blank page. The post is still edited, but again, redirection is broken.

    Also, the code works fine on my local server running PHP5. This server is running PHP4 however. I really don’t see why that’d make a difference in this case though…

Viewing 3 replies - 1 through 3 (of 3 total)
  • chdir('../forums/');

    thats unnecessary, if you use the proper path to the file(s) you want to include.

    require_once('../forums/bleh.php');

    Thread Starter zxb2

    (@zxb2)

    Cheers, got it working now. Chdir wasn’t the problem for some reason functions_newpost.php from vBulletin was conflicting with WordPress. I just copied one of the functions I needed from the file into post.php and it works fine.

    Cool, happy to hear that. ffr, I wasnt suggesting that your usage of that was a problem, just pointing out that it’s not needed.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Chdir problem’ is closed to new replies.