|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-04-20 23:57 UTC] colder@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 10 03:00:01 2025 UTC |
Description: ------------ I have a very simple program that works perfect if I use require_once("gateway.php") However if I change it to: require_once("http://localhost/gateway.php") it does not work. Yes I have allow_url_includes turned on. And yes I can see the file being opened by Apache and it is opening all the subordinate includes that are contained within gateway.php. Reproduce code: --------------- Test.php <?php require_once("http://localhost/gateway.php"); $services = new GatewayServices(); $function = $_REQUEST["method"]; $xml = $services->{$function}($_REQUEST); ?> Gateway.php File <?php class GatewayServices { function test($params){ return "<XML Success=Ok/>"; } } ?> Expected result: ---------------- http://localhost/index.php?method=test Should produce <XML Success=Ok /> Actual result: -------------- Class GatewayServices does not exist. If you change the require_once to: require_once("gateway.php") it works. And Yes it needs to be able to work both ways for Load Balancing and failover reasons.