you should put something before the exit; if you want something to be displayed while you are logged in.
for the second, i really have no idea. a member confirmed that the code works in another thread:
https://vborg.vbsupport.ru/showthread.php?t=73731
try using just chdir("./forums"); and see what happens. (assuming your site and this script are in: /home/thephone/public_html/)