Re: Can PHP be used to write permanent file changes?
- From: "ZeldorBlat" <zeldorblat@xxxxxxxxx>
- Date: 23 Feb 2006 16:45:29 -0800
sethjohnson777@xxxxxxxxxxx wrote:
Hey everyone, sorry as usual if this is the wrong place to post this
but...
I have an idea and I want to build a web based prototype and to start
with I just need to know how to make pages where the user can type a
response eg "Hello, I believe in Peace, Love and Understanding", and
then click submit and then the web page is altered to include that text
somewhere on it. If new users navigated to the page then they would see
everyone's previous submissions.
I know it's not rocket science and my html skills are basic but fine
but reading around I'm not sure if I should do this with javascript,
perl, php, cgi or something else so I was wondering what you would
advise?
From what I've read, PHP will do that but is not be able to actuallywrite the new html file on the server? Just a point in the right
direction would be much appreciated!
Thanks,
~Seth Johnson.
Any system that does what you describe requires (at a minimum) the
following:
1) Something to process user submissions and store them
2) A place for storing submissions indefinitely
3) Something to retrieve the stored data and display it to the user
A pure client-side solution fails all three of these requirements, so
forget about Javascript. Perl, PHP, and other cgi's can all handle #1
and #3. #2 requires a file in the server's filesystem (as you've
described), a database, or some other storage mechanism.
For whatever it is you want to do a database will probably give you
more flexibility than simply writing the text to flat files.
Having said that, PHP can -- if configured correctly and given
appropriate filesystem permissions -- write anything you want anywhere
on the server. In other words, PHP has no problem writing an HTML file
to the server on which it's executing.
.
- References:
- Can PHP be used to write permanent file changes?
- From: sethjohnson777
- Can PHP be used to write permanent file changes?
- Prev by Date: Can PHP be used to write permanent file changes?
- Next by Date: PHP Page and Database Not Interfacing
- Previous by thread: Can PHP be used to write permanent file changes?
- Next by thread: PHP Page and Database Not Interfacing
- Index(es):
Relevant Pages
|