I am using require_once like this
require_once(\'../mycode.php\')
I am developing a wordpress plugin. My plugin folder is yves-slider where
You want to make that relative to the current path the file is in:
require_once __DIR__ . '/../yves-slider.php';
What probably is happening is that the current path PHP looks in is not the path you think it is. If you are curious about what it is (the current path) you could do echo getcwd();.