Direct POST/GET request to WordPress plugin file

13 views
Skip to first unread message

petervan...@gmail.com

unread,
Jun 16, 2021, 2:48:58 PMJun 16
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

unread,
Jun 18, 2021, 9:37:17 AMJun 18
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
Forward
0 new messages