On Thu, 17 May 2001, Christopher Heschong wrote:
> on 5/16/01 5:10 PM, Richard Kurth at [EMAIL PROTECTED] wrote:
> > [snip]
> > if(file_exists("userdata")) {
> > end;
> > } elseif(file_exists("userdata1")) {
> > copy('userdata1','userdata') ;
> > system("rm userdata1");
> > end;
> > } else {
> > exit;
> > }
>
> if (!file_exists("userfile")) {
> if (file_exists("userdata1") {
> unlink("userfile1");
> }
> else {
> exit;
> }
> }
minor correction. you still need the copy.
for myself, i would do it slightly differently, i'd use
system("mv userdata1 userdata");
but that's just because i prefer one line to two and i
don't mind if the code won't run on win32 or other
OSs that don't have an rm command.
if you don't mind doing it in two instructions or portability
to win32 is important to you, then:
{
copy ('userdata1','userdata');
unlink('userdata1');
}
tiger
--
Gerald Timothy Quimpo [EMAIL PROTECTED] http://members.xoom.com/TigerQuimpo
entia non sunt multiplicanda veritas liberabit vos
praetere necessitatem mene sakhet ur-seveh
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]