Welcome Guest, Not a member yet? Register   Sign In
Help on including remote php file
#1

[eluser]esthonwood[/eluser]
Hi, I'm confused! I need to include a remote php file containing some functions I need (http://www.sample.com/functions.php) and i don't know how and where to put it. Here's my controller code:

Code:
<?php

class Welcome extends Controller {

    function Welcome()
    {
        parent::Controller();            
        
    }

    function index()
    {        
        include('http://www.sample.com/functions.php');
        $data['rs'] = sampleFunction();//one of the functions in http://www.sample.com/functions.php
        $this->load->view('welcome_message', $data);
    }
}

?>

I get this error - Fatal error: Call to undefined function sampleFunction().

I'm using CodeIgniter v1.7.0 and I have enabled the allow_url_include directive. I know I should put the include somewhere but i'm lost.

Any help would be greatly appreciated! Thanks guys! :-)


Messages In This Thread
Help on including remote php file - by El Forum - 11-13-2008, 02:45 AM
Help on including remote php file - by El Forum - 11-13-2008, 03:00 AM
Help on including remote php file - by El Forum - 11-13-2008, 03:39 AM
Help on including remote php file - by El Forum - 11-13-2008, 05:19 AM
Help on including remote php file - by El Forum - 11-13-2008, 05:20 AM
Help on including remote php file - by El Forum - 11-13-2008, 06:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB