Jump to content

macworks

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

macworks's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Okay I'm building a PHP driven document library where users can upload and download documents, create folders, sub-folders, etc. I discovered that I needed to use clearstatcache to force PHP to actually look at the file system to determine if a file exists or if an item is a directory / folder. But when I remove files from the folder, PHP still thinks that the item is there when I use is_readable or is_dir or file_exists. I even went so far as to upgrade PHP from 5.1.4 to 5.1.6 and I restarted Apache too. Does anyone have any insight on this? In case you are wondering, my document library uses a database to store the list of document with some additional meta-data, so when a user visits a doc lib folder, PHP grabs records from the database to see which files are in the directory, then checks the file system to make sure that the files are actually there.
  2. I'm wondering how to prevent a page refresh from re-posting the form values so that PHP won't re-process the same form submission twice. For example, I'm building my own custom message board and when a poster submits their new post, they get the result page which shows that their message was successfully posted. But if they refresh the browser window, they'll end up posting the message again. Is this where session.cache_limiter comes in? I realize I could send another header once the post has been logged into the DB in order to forward on to yet another page (preventing this refresh scenario) but I'd prefer a slightly easier method of preventing the refresh from happening altogether.
×
×
  • 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.