[email protected] Posted September 17, 2006 Share Posted September 17, 2006 i need the PHP code for recognising if a directory named "userfiles" exists.i also need the PHP code for redirecting to another PHP file. Link to comment https://forums.phpfreaks.com/topic/21082-recognise-if-a-directory-exists/ Share on other sites More sharing options...
redarrow Posted September 17, 2006 Share Posted September 17, 2006 1.is_dir($what_ever);http://www.phpfreaks.com/phpmanual/page/function.is-dir.html2.header("location: where_ever.php"); Link to comment https://forums.phpfreaks.com/topic/21082-recognise-if-a-directory-exists/#findComment-93623 Share on other sites More sharing options...
[email protected] Posted September 17, 2006 Author Share Posted September 17, 2006 ok so i did this:[code]<?phpif (is_dir('userfiles')){echo "userfile DOES exist";elseecho "userfiles does NOT exist";?>[/code]and it outputs this:[b][i]Parse error: syntax error, unexpected T_ELSE in /index.php on line 4[/i][/b]but i can't see what i did wrong! please help! Link to comment https://forums.phpfreaks.com/topic/21082-recognise-if-a-directory-exists/#findComment-93642 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.