you're a bit vague on details, but, have you got an absolute path in there? something like:
$webPath = "/Users/phil/Projects/blah/companyname/stuff/website/includes";
if so, that would explain why it works locally, but not on your testing server
if that's not it, then chuck us a few more details