I use realpath(\'../\'), it work fine but the result is D:wampwww ( real path is D://wamp/www ). Anybody can tell me how to get realpath by the right way? Thanks you verry much.
If using php 5.3 or up then use
filter_input(INPUT_SERVER, 'DOCUMENT_ROOT');