I have added a folder (json) to wp-includes
with a file inside called users.json
. I am trying to write to this file but am getting the following error:
failed to open stream: HTTP wrapper does not support writeable connections
I have been referencing it like the following in my php:
$file = "http://www.fakeurl.com/wp-content/json/users.json";
I believe I need to reference as per the name on the server. Is there a built in way to get this in wordpress?
Something like <?php echo get_template_directory_uri(); ?>