JustinMs66@hotmail.com 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. Quote Link to comment 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"); Quote Link to comment Share on other sites More sharing options...
JustinMs66@hotmail.com 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.