Search code examples
phpwebserverinclude-path

how to use php files from other domain name?


using two portals with different web domains (Eg: www.buyer.com, www.seller.com), i have a common php file in www.buyer.com i need to include that file www seller.com how it is possible.

the file login

www.buyer.com/main/login.php

that have a code

    if(user_flag == "seller")
{
    include("www.seller.com/system/login_cfm.php");
}
else
{
    include("../system/login_cfm.php");
}

but its not working what to do...


Solution

  • Please check php.ini for following option. it should be true. allow_url_include boolean This option allows the use of URL-aware fopen wrappers with the following functions: include, include_once, require, require_once.

    Check source link : http://php.net/manual/en/filesystem.configuration.php#ini.allow-url-include