12-20-2007, 01:52 AM
|
#1 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
Having trouble with Custom Function "isImage"
PHP Code:
<?php
function isImage($handler) { if(file_exists($handler)) { $handler == $handler.".JPG"; $handler == $handler.".PNG"; $handler == $handler.".GIF"; $handler == $handler.".BMP"; } }
$handler = "test.bmp";
if(isImage($handler)) { echo "$handler is in fact, an Image!"; } else echo "$handler is not an Image!";
?>
It outputs $handler is not an Image when really it is!
What is the problem here!
One more thing, is it case sensitive?
|
|
|
|