skimpydog.com Forum Index Scripting php - editing text files on a server |
Browsing this Thread:
1 Anonymous Users
Bottom Previous Topic Next Topic |
|
|
|
---|
Poster | Thread |
---|
|
php - editing text files on a server | #1 |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Webmaster
Joined: 2007/6/10
From Dallas, TX
Posts: 79
Level : 7 HP : 0 / 170 Group:
Webmasters Registered Users |
I cannot stress enough that if you use this script to make sure the script in in a secure area, with preferably limited access rights from the outside world! - This should be encrypted traffic, and secured with user authentication, and session handling. I take no responsibility if your server get's hacked because you do not know what you are doing.
This is a very basic script that should be inserted with a header, and footer to handle cookie sessions and user authentication at a minimum! Preferably even with SSL so if your traffic is sniffed, still only you know of the file. The scope of this script is to be able to view, and edit a flat text file, while keeping the structure of the file intact by means of <textarea>. The file you want to edit needs to be editable by the webuser - This is the user which is running the web server daemon, normally on apache, this is the user "nobody". -- This is considered insecure! Normally the file(s) you want to edit must contain the permissions of "666", such as:
This does however depend on the server configuration. This script works with "regester_globals = off" in your php.ini. Then create the php page with the following:
|
||||||||||
Posted on: 2008/12/20 19:36
|
Top Previous Topic Next Topic |
|