deal with the path writing by php