Direct POST/GET request to WordPress plugin file

Skip to first unread message

Jun 16, 2021, 2:48:58 PM6/16/21
to Minneapolis St. Paul WordPress User Group
Hi all,

I'm trying to deal with some issues on an inherited site that uses a lot of non-WordPress PHP within a WordPress site.  It handles POST/GET requests differently than I usually do and all of them aren't working on my local copy.  I already posted on Stack Overflow with more details, but wanted to see if anyone here had an idea.

- Peter

Patrick Lewis

Jun 18, 2021, 9:37:17 AM6/18/21
to Minneapolis St. Paul WordPress User Group
I can think of one reason. From your snippet posted on Stack Overflow, I noticed the top lines.

    $DIR = explode("public_html", __DIR__); 
    $urlLOC = str_replace("engine","",$DIR[1]);

This is using the text 'public_html' as the delimiter for the PHP 'explode' function. This strategy will not work if your document root is not named 'public_html.'
Reply all
Reply to author
0 new messages