I’m fairly new to wordpress and I’m having a strange issue:
when I put this line as a code snippet in a blog post:
$app = require_once __DIR__.'/../bootstrap/app.php';
I get a 404 error when I try to preview the page, and I wont be able to save the post at all but if I make the line of code incorrect for example, remove the last ‘e’ from require, this way:
$app = requir_once __DIR__.'/../bootstrap/app.php';
everything works fine. Is the code somehow executing and causing problems? Thanks for your help.
Read more here: php code snippet causing page 404 in wordpress