very very very urgent topic

php India
  • 13 years ago

    IN PHP

    i m using a function---------->     

    $npath="delta_test 24.jpg"

    $im = imagecreatefromjpeg($npath);

    In $npath the file name contains space, due to this space, function imagecreatefromjpeg() cannot

    works . they generate error due to space in filename .

    i cannot change the file name due to some reasons.

    but it is important to use this function .

    what can i do ?  ?  ?   ?   ?    ?

    Can any one solve this problem

     

     

  • 13 years ago
    How about you replace the space in the string with for example %20. I think there is a function in php which you can use to search into a string and then replace.

    shap, shavena



  • 13 years ago
    if i change replace the %20 or space , than the file name can changed

    eg if the file is at  e:\webrrot\test_test 123.jpg

    if i replace the space then the file name can changed and file the message is comming "FILE NOT FOUND"







Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debuggers don't remove bugs. They only show them in slow motion.”