You should use your own constant DIRECTORY_SEPARATOR instead of entering (backward) the slash yourself, so your code will work on any platform.
$path = '.'.DIRECTORY_SEPARATOR.'mydir'.DIRECTORY_SEPARATOR.'myfile';
In addition, windows support backslashes and forward slashes, so you can just use slashes around the world.
For example, both of these work in a window:
$path = './mydir/myfile';
$path = '.\mydir\myfile';
source
share