Issue Summary
I am using “file_get_contents” to load a json file from my theme (functions.php). Locally, everything works fine, but when I open the site via a Live Link I get an error:
( ! ) Warning: file_get_contents(https://official-circle.localsite.io/wp-content/themes/l4f/dist/parcel-manifest.json): Failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized in /Users/bernhardpoppe/Local Sites/l4f/app/public/wp-content/themes/l4f/functions.php on line 56
The code that causes the problem:
$manifest = file_get_contents(get_template_directory_uri() . “/dist/parcel-manifest.json”);
System Details
- Which version of Local is being used? → Local 6.2.1
- What Operating System (OS) and OS version is being used? → MacOS Monterey