Depending on server setup. It is usuall to put CGI scripts to cgi-bin. Files they use (require or include) can be elsewhere. If your files are:
main.html:
<form action="/path1/blah.php">...</form>
blah.php:
#!/usr/bin/php
<?php
require("/path2/common.inc");
?>
then main.html can be anywhere in web directory, while common.inc can be anywhere on disk. On the other hand, blah.php must be in cgi-bin.
I repeat - this is usuall configuration. If CGI scripts are allowed to be anywhere, then blah.php can be placed anywhere in the web directory.
Good luck,
Vedran