Reply to Re: Creating files using fopen that are unlocked!

Your name:

Reply:


Posted by George Chapman on 10/06/05 23:05

In article <1126466495.057858.47870@z14g2000cwz.googlegroups.com>,
marcrice20@msn.com says...
> Hi everyone
>
> i'm trying to setup my website to create new webpages dynamically using
> php but I am have a major problem in that whenever i create a file it
> is always created locked so that it can only be read even when i
> specify read and write access.
>

This is probably not quite what you are looking for, but what about an
alternative?

Based on other responses in this thread, it appears that your host has
some restrictions in place, not the least of which is PHP's SafeMode,
which severely limits (1) the whole file creation process/access
process, (2) changing permissions, and (3) running external programs.
Modifying INI settings is affected as well. Do a search for SafeMode in
the PHP manual to get all the specifics.

Meanwhile, here is my take...

Are indivudual files really the best what to do this?

PHP is not really designed to store data in files. Rather, if your host
also provides a MySQL hookup, a better route might be to store your
pages in a database table, rather than individual files. You would then
have a query look up the individual page's HTML code based on, say, a
variable called PAGE_ID, which you could pass via the URL and retrieve
with $_GET['PAGE_ID']

Not the ideal solution for every possible application, I know. Just a
thought.

- GC

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация