In my root folder I have a file folder that has my common files I use between different projects. /files I have a file redis.php that has Redis class that I want to use in one of my project in /var/www/html/project/example.php The Class Redis is in /file/library/storage/redis/redis.php
my redis.php has
<?php
namespace file\library\storageedis;
class Redis{
public function init(){
$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
}
}
?>
and in my example.php I call that namespace like
$redis = new \file\library\storageedis\Redis();
$redis->init();
but it gives me an error
[Mon May 27 12:25:48 2013] [error] [client 127.0.0.1] PHP Fatal error: Class 'file\\library\\storage\edis\\Redis' not found
Any help will be appreciated