I need to open an xml file and allow people to add entries to the file. So i need to open it with read and write access be able to insert an entry and then close it with read only access so another program (adobe bridge) cant write over the file.
mikeandike22
18
Nearly a Posting Virtuoso
Recommended Answers
Jump to PostUse chmod to set the permissions of the file so its writable. Then open it with write access, then after you write and close the file, use chmod again to change the permissions to read only.
eg:
@chmod ($configfile, 0755); $xml_string = file_get_contents($filepath); read_write_to_xml($xml_string); if ($fp …
All 3 Replies
digital-ether
399
Nearly a Posting Virtuoso
Team Colleague
mikeandike22
18
Nearly a Posting Virtuoso
digital-ether
399
Nearly a Posting Virtuoso
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.