Dont unlink the file from ossn_data

Dimitris Kerestetzis Posted in Beginning Developers 8 years ago

Hello,
I have the following code

       $db->statement("SELECT * FROM ossn_entities_metadata WHERE(
           guid='$value' ) ");
            $db->execute();
            $get_image = $db->fetch(true);

             foreach($get_image as $key1=>$value1){
                $image = str_replace('photo/', '', $value1->value); 
                $delfile = ossn_get_userdata("{$groupID}/photo/{$image}");

                 if(is_file($delfile)){
                      unlink($delfile);
                 }
            } //end foreach

I have check the path, is home/......etc/photo/image.jpeg but it doesnt unlink the image from ossn_data folder. The problem is in path or I need something else to recognise the Ossn the unlink command?
Thanks

Replies
Indonesian Arsalan Shah Replied 8 years ago

Are you sure the $delFile is correct path?