$zip->addFromString('filename_part1 / filenamepart2', $data);
The result is a dir named 'filename_part1' contain a file named 'filenamepart2'.Bu t i only want a file named 'filename_part1 / filenamepart2'.
A '/' character is an illegal character to have in part of a file name, and it typically denotes a directory/file structure in most computer operating systems. I suggest not using a '/' in a file name.