• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI 3.0.7 don't see APPPATH. Why?

#1
Hi!
My controller
PHP Code:
public function getorders()
 
   {
 
       $apiKey '*****';
 
       $apiSecret '***';
 
      
        require_once APPPATH
.'libraries/Client.php'

Why is CI don't see libraries folder? 
Severity: Warning

Message: require_once(C:\OSPanel\domains\site3\application\libraries/Client.php): failed to open stream: No such file or directory
Reply

#2
Er, your title is misleading. CI does see APPPATH - that is obvious from your error message.
The error message suggests that Client.php is not in that location.

Curious, but why wouldn't you use $this->load->library('client') ? That is the "CI way".
Reply

#3
I tried to connect it like you said .. also does not work (
Here's what I want to connect ..
https://github.com/edsonmedina/bittrex
Reply

#4
(02-28-2018, 05:04 PM)ciadmin Wrote: Er, your title is misleading. CI does see APPPATH - that is obvious from your error message.
The error message suggests that Client.php is not in that location.

Curious, but why wouldn't you use $this->load->library('client') ? That is the "CI way".


Attached Files Thumbnail(s)
   
Reply

#5
P.S. i'm used last version (3.1.7, php 7.2)
Reply

#6
Your path has all backslashes, until the end, where it has /Client.php.

Maybe try using a backslash?
Reply

#7
in client.php remark out the name space.

PHP Code:
// Load the library
$this->load->library('client');

// Create a new instants of client
$test = new client($apiKey$apiSecret); 

Load it like any other CodeIgniter Library...
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#8
I solved the problem ..
If you connect as a library - it does not work, because there is a call right away
If you connect as a helper - it works. Because when connected helper is not immediately called
Thank you
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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