You are here: Re: funny problem « PHP Programming Language « IT news, forums, messages
Re: funny problem

Posted by NC on 11/02/47 11:30

Joseph S. wrote:
>
> (1) I have about 8-9 .php files which are far from complex. I first
> used GET in all of them. Worked fine. Then I changed all method="get"
> to method="post" and $_GET to $_POST with search-replace, thinking that
> it should work, but, it seems the $_POST variables are not getting
> populated. Then I tried a simple one-page script using post - works
> fine. So what could be the problem?

Some typo somewhere... Say, you now have $POST or $_POTS instead of
$_POST...

> (2) How do you address the situation where you have several
> simultaneous users of your web application and your script reads from
> the same single file, and maybe writes to the same single file

Reading from the same file on a modern operating system should
require no attention at all; it is handled on the OS level.
Writing... well, read up on flock() and see what the manual has
to say about OS-specific details...

http://www.php.net/flock

> I looked for "threadsafe" and "multiple user" but could not get
> anything.

Thread is a Windows-only concept. On Unix, there are no threads,
only full-blown processes, each with a distinct ID... This is
why file locking would work on Unix, but not on Windows...

Cheers,
NC

 

Navigation:

[Reply to this 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

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