Welcome Guest, Not a member yet? Register   Sign In
Parse error including vendor/autoload.php
#8

(This post was last modified: 04-06-2015, 12:29 PM by cleetus.)

Quick update on this - I can get the library to work when I load it in an individual controller when loading it like this:

PHP Code:
include APPPATH 'vendor/mixpanel-php/lib/Mixpanel.php';
$mp Mixpanel::getInstance("f8d9db172d290de89a69e2b8414e497a"); 

It's selective about what events it lets me track though. I tried to track the user...
PHP Code:
$user $this->session->userdata('email');
$mp->identify($user); 


But it wouldn't let me. I could, however, track clicks. Very strange. I was starting to write a library for it, but when I load it, same thing: 500 error. As you can see, it's pretty simple...

PHP Code:
class Mixpanel_lib
{
 public function 
__construct()
 {
     include 
APPPATH 'vendor/mixpanel-php/lib/Mixpanel.php'
 
 
               //set token
     
$mp Mixpanel::getInstance("OUR_TOKEN");

 
       }

Reply


Messages In This Thread
RE: Parse error including vendor/autoload.php - by cleetus - 04-06-2015, 12:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB