Plugin using shortcode needing multiple folders (2 posts)

  1. player1
    Posted 4 years ago #

    I'm working on a plugin which is pretty much one php file and a bunch of folders with other php files in them(they're library files written by someone else and I'd like to avoid tampering with them as much as possible).

    The plugin is loaded via shortcode into pages and posts and it needs to include a php file from one of the folders. That works just fine. Problem is that the file also needs to include some files from the folders which in turn do the same, and somewhere along the way the paths get messed up and the whole thing stops working.

    So my question is, how can I make sure the paths don't get messed up?

  2. hedronist
    Posted 4 years ago #

    I suggest spending some time at php.net reading up on require and include and how they handle relative paths.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.