You are here: Re: [PHP] rename « PHP « IT news, forums, messages
Re: [PHP] rename

Posted by "Richard Lynch" on 06/18/05 23:39

On Sat, June 18, 2005 3:50 am, Mister Jack said:
> I would like to know precisely what rename do in case of error. any
> link for that ?

It will probably return 0 (or maybe -1) on error.

It may or may not also fill in $php_errmessage (?) or whatever the
variable is called.

It should be documented at http://php.net/rename what error codes it returns.

If not, you could run some tests fairly easily.

> I do a : @rename($old, $new), what happens if I run out of space ?

It won't work, and you have suppressed the error message, so you won't
even know it didn't work.

Using @ like that is just a Bad Idea.

You need to write better software that handles error conditions and does
something reasonable about them.

? is
> the rename just an alias for C function library ?

Pretty much, but not to the point that it blindly returns whatever the C
'rename' returns, probably.

You could read the PHP source and find out :-)
http://cvs.php.net

--
Like Music?
http://l-i-e.com/artists.htm

 

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

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