I want to go up two directories from the current working directory.
I used chdir("..") two times to make the move. And after that I call mkdir("directoryname") ; but when I looked at the operating system ( Linux Ubuntu ) then the directory is not created ; even though I already set the chmod 777 to the parent directory into which I want to create the new directory. So how to mount up two directories level with PHP ?
Verify “where” your script started and where it is after the two chdir()s via
also test the return value of mkdir
or use getcwd() or _FILE_, _DIR_ (or whatever is suitable) and dirname() to create an abosulte path for mkdir()