[PHP] How do I return the error

2004-07-28 Thread Matthew Oatham
Hi I have this function below - if it reurns false I want to also return the error so I can print it in my calling function. Can I do this? Cheers Matt function fileUpload($file) { if ($file['type'] == image/gif || $file['type'] == image/pjpeg){ if (@copy ($file['tmp_name'], images/ .

Re: [PHP] How do I return the error

2004-07-28 Thread John Nichel
Matthew Oatham wrote: Hi I have this function below - if it reurns false I want to also return the error so I can print it in my calling function. Can I do this? Cheers Matt function fileUpload($file) { if ($file['type'] == image/gif || $file['type'] == image/pjpeg){ if (@copy

Re: [PHP] How do I return the error

2004-07-28 Thread Matthew Oatham
what about returning the error the copy function would have thrown ? Thanks - Original Message - From: John Nichel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 28, 2004 3:00 PM Subject: Re: [PHP] How do I return the error Matthew Oatham wrote: Hi I have

Re: [PHP] How do I return the error

2004-07-28 Thread John Nichel
Matthew Oatham wrote: what about returning the error the copy function would have thrown ? Thanks http://us4.php.net/copy It only returns true or false. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] How do I return the error

2004-07-28 Thread Curt Zirzow
* Thus wrote Matthew Oatham: what about returning the error the copy function would have thrown ? * turn display_errors off: ini_set('display_errors', false); * turn track_errors on: ini_set('track_errors', true); if (! copy(...) ) { echo copy failed: $php_errormsg; } Curt -- First, let

Re: [PHP] How do I return the error

2004-07-28 Thread Tom Rogers
Hi, Wednesday, July 28, 2004, 11:56:16 PM, you wrote: MO Hi I have this function below - if it reurns false I want to MO also return the error so I can print it in my calling function. MO Can I do this? MO Cheers MO Matt MO function fileUpload($file) { MO if ($file['type'] == image/gif ||