Configuration : WAMP on windows drupal 7
I have tried using
$image = file_get_contents('E:Team_Installwampwwwrootfoldersitesallmodulesmy_moduleerrorwinmobilesdk.jpg'); $file = file_save_data($image, 'public://',FILE_EXISTS_REPLACE);
I can see the result after first line file_get_contents
but on file_save_data
I get that destination folder invalid error
Another method I had tried was $file = file_copy($source, $dest);
here also it says $dest does not exists Wrapper folder permission and path are check thorughly they are working when I add an image using media_gallery module as it saves to public gallery or creates a new article with image, when I try to add from code it breaks and start showing message
The data could not be saved because the destination public is invalid. This may be caused by improper use of file_save_data() or a missing stream wrapper.
Please help I am new to drupal and stuck at this.
Thanks in advance