0

I have image with the name abc.jpg when I convert this image in PNG format and change the Image name like "Burks_10DF4-1-1/4-AB-MV.png" it consider slash to directory that I am giving in the image name and getting error. anybody please guide how to resolve this issue.

I am getting this error "Message: imagepng(Burks_10DF4-1-1/4-AB-MV.png): failed to open stream: No such file or directory"

Thanks

stackers
  • 385
  • 4
  • 18
  • 4
    "/" is not a valid character for any filename. there is no fix except to use a valid file name............. – I wrestled a bear once. Jan 09 '17 at 21:15
  • 3
    Possible duplicate of [Allowed characters in filename](http://stackoverflow.com/questions/4814040/allowed-characters-in-filename) – I wrestled a bear once. Jan 09 '17 at 21:16
  • Image name that I am adding is coming from DataBase that is Model name. so I want to change the default image name with Model name. is there any way to do this? – stackers Jan 09 '17 at 21:18
  • not if the model name contains a "/". the end user will never see the filename anyway so why is it important? – I wrestled a bear once. Jan 09 '17 at 21:20
  • my client have requirement change image name with Model name. so there are lot of Model name that have "/". – stackers Jan 09 '17 at 21:23
  • 1
    well... you could actually turn them into directories so the file **path** looks like that, but youre wasting you time tryig to figure out how to make the file **name** look like that because it will never happen. we all get retarded clients sometimes. it happens. – I wrestled a bear once. Jan 09 '17 at 21:28
  • yes , I replace the slash with some specific char. Thanks – stackers Jan 10 '17 at 18:40

0 Answers0