For example, somewhat edited, here is mine:
chdir('/home/xxxxxxx/christianboards/forums/');
This is my /path/to/my/forums/ since searchresults.php is located at forums/searchresults.php
You will never use a file in a path (a path is a directory). In your case, try taking out searchresults.php from your path.
chdir('/home/public_html/');
It has to be the full path to your searchresults.php, but don't include the file itself. Hope that helps