Welcome Guest, Not a member yet? Register   Sign In
How to show an error if there is no folder.
#2

[eluser]pistolPete[/eluser]
You can use the PHP function is_dir(): http://php.net/manual/en/function.is-dir.php

Code:
if( !is_dir('./images/'.$foldername.'/') )
{
   // check the return value in your controller; if model returns FALSE, show an error
   return FALSE;
}
else
{
   // upload
}


Messages In This Thread
How to show an error if there is no folder. - by El Forum - 01-02-2010, 12:08 PM
How to show an error if there is no folder. - by El Forum - 01-02-2010, 12:35 PM
How to show an error if there is no folder. - by El Forum - 01-02-2010, 12:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB