I'm new to PHP.
Today I tried to require a PHP library called "Ripcord", and it's not working.
I installed the library using Composer, using this command:
% composer.phar require darkaonline/ripcord
...and as you can see the vendor library is created in my source tree:
Here is how I call require_once in my code (test.php
in source tree above)
<?php
require __DIR__ . '/vendor/autoload.php';
$url = "http://ymb.lan:8069";
$db = "odoo_elite";
$username = "admin";
$password = "admin";
require_once('ripcord.php');
$common = Ripcord::client("$url/xmlrpc/2/common");
$common->version();
But when I run, I get the following error on the require_once line:
% php test.php
Warning: require_once(ripcord.php): failed to open stream: No such file or directory in /Users/eylin/Dropbox/Code/elite-portal/test.php on line 10
Fatal error: require_once(): Failed opening required 'ripcord.php' (include_path='.:') in /Users/eylin/Dropbox/Code/elite-portal/test.php on line 10
Any ideas?
If you are in a Linux system, I support the file name you want to include is Ripcord.php (starts with uppercase R). However you are writing with small case r in the statement:
require_once('ripcord.php');
Try rechecking the OS type.