relative path in require_once doesn't work
Use
__DIR__
to get the current path of the script and this should fix your problem.
So:
require_once(__DIR__.'/../class/user.php');
This will prevent cases where you can run a PHP script from a different folder and therefore the relatives paths will not work.
Edit: slash problem fixed
for php version 5.2.17 __DIR__
will not work it will only works with php 5.3
But for older version of php dirname(__FILE__)
perfectly
For example write like this
require_once dirname(__FILE__) . '/db_config.php';