• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Include external php file in controller action

Hi ,
Is there any way that i can include an external file place at root from controller action.

Here is my code
function error_template($msg_id){
    $message="User Account Resumed Sucessfully.";    
    $message="User Account Created Successfully. Mail send to the registered person.";
    $message="User Account Updated Successfully.";
    $message="User Account Deleted Successfully.";
    $message="User Account Status Changed Successfully.";
    include base_url().error_template/error_template.php';

What i am lacking over here
CI throws me this error.
A PHP Error was encountered

Severity: Warning

Message: include() [function.include]: URL file-access is disabled in the server configuration

Thanks in advance.

[eluser]Phil Sturgeon[/eluser]
Your error told you the problem here.

You cannot include via a URL. Instead of bath_url() use BASEPATH.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.