Jump to content

dcell59

New Members
  • Posts

    2
  • Joined

  • Last visited

dcell59's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks! I wasn't sure I could go outside of the web site. I assume I use something like ../../myprivatedirectory/myfile.txt
  2. I'm just getting started with WP and php, but I'm an old school Unix programmer. I found some code that will allow me to create a page that works kind of like the WP theme file editor. I want to be able to load up a text file, display it in an edit field on a form, and then when the user hits the submit button, the server will back up the old file contents and write the new data into the file. Pretty simple. My problem is that I want to be able to keep people from viewing and modifying the files from the web site. I can secure the web page so that only specified roles can access the page, but if someone can guess the path to my text file on the server, they can read it (and possibly write it?). How do I prevent this, while still allowing my php code on the WP page to read and write the file? (PS, in the long run, I'll probably put the data in the database so I don't have to worry about this, but I'm hoping there's an easy solution to get me going.) Thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.