earlier it was working fine but after migrating to new server with same apache and php version, it is giving error of file not found.
This is likely due to portability constraints.
As a rule of thumb, if you’d like your application and data to be portable across systems, you should construct filenames from the portable filename character set only. See 3.265 Portable Filename Character Set (opengroup.org).
The space character is sort of a typical candidate where things break as it is often used as a field separator and henceforth turns one path into two.
Hyphen-minus “-” or low-line/underscore “_” are typically in use to replace them in pathnames.
This is also compatible with the path component of a uniform resource locator (URL). That is the part of the URL a web server in a basic configuration commonly maps onto the systems file system relative to the document root.
Consult the documentation of the web server you are making use of how it basically works. You may also find some documentation there how to handle file name portability.
/Edit: Just seeing you tagged “apache”, some more references, one also on-site (Q&A):