> -----Original Message-----
> From: Jason Soza [mailto:[EMAIL PROTECTED]]
> Sent: 25 April 2002 05:06
>
> Yike, now I wish I hadn't found it:
>
> [Wed Apr 24 19:42:18 2002] [error] PHP Warning: Wrong
> datatype for second
> argument in call to in_array in beta_up.asp on line 61
57 function ext_valid ($filename) {
58
59 $extget = substr( strrchr($filename, "."), 1);
60
61 $found = in_array($extget, $extval);
62
63 if ( $found ) {
64 echo "<p><font color='red'><center>"
65 . $message["invext"]."</font></center></p>";
66
67 $rc = 2;
68 }
69 }
$extval is undefined on line 61 -- it's neither a parameter to the function nor a
variable defined in the function. If you are intending to refer to the $extval
defined in the global scope, you need to global it in the function:
57 function ext_valid ($filename) {
58
59 global $extval;
etc.
> [Wed Apr 24 19:42:18 2002] [error] PHP Warning: Undefined variable:
> upload_path in beta_up.php on line 73
Same.
> [Wed Apr 24 19:42:18 2002] [error] PHP Warning: Undefined variable:
> timestamp in beta_up.php on line 73
Same.
... and, I'd guess, same for most of the others. Try globalling all the global
variables you're using in functions, or passing them as parameters, and then try again.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php