This must be one of the most annoying errors to get when working with php. This error occurs when PHP can't find the specified file in the include statement. This often occurs when a developer has built an application on their machine and uploaded the application to a shared hosting account or if they move the application to a sub folder.

An easy work around is to determine the path to the called file dynamically.

$folcnt = substr_count($_SERVER["PHP_SELF"], "/");
$folappstep = "";
if($folcnt > 1) {
 for($i=2;$i<=$folcnt;$i++) {
  $folappstep .= "../";
 }
} else {
 $folappstep = "";
}

$extfile = $folappstep."ws8_extensions.php";
$funfile = $folappstep."ws8_functions.php";

include $extfile;
include $funfile;

Thanks

Ben
Lts Media Ltd.
>snipped<

I do realize this was a fake post and an advertisement (judging from the snipped signature) but I'd like to add my five cents anyway, because the method described above is pretty crude.
An easy and elegant method is:

include dirname(__FILE__)."/ws8_extensions.php";
include dirname(__FILE__)."/ws8_functions.php";

BTW: Thanks for removing the ad. When we're at it, how about to close the thread as well so that it doesn't appear in unanswered threads search results? Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.