I would like to run a php script through the CLI prompt on a WampServer installation on Windows 7. The problem here is that there are many files included in the script in 2-3 levels and my requires are sometimes using relative paths which do not work using CLI. Is there any way to solve this issue?
strange, relative paths may be using the wrong directory separator, swapping "egg/foo.php" for "egg".DIRECTORY_SEPARATOR","foo.php" would be good practise and most likely solve this. similarly, not using ".." and instead using dirname(__FILE__) - where dirname is repeated once for each level up you need to go - would help.