You did not specify which line is getting the error. I am guessing one of the File lines????
Have you tried... $file = new File(WWW_ROOT ."/img/group-banners/banner/".$group['Group']['id']."-".$group['Group']['photo_secret'].".jpg"); On 11/12/2012 9:51 AM, chris...@yahoo.com [via CakePHP] wrote: > no one,...??? > > On Sunday, November 11, 2012 4:24:25 PM UTC-8, Chris wrote: > > > hi guys,... can someone help me please,... > > I got image files in server: > > /img/group-banners/original/39-afgmeq4hbsq7fmx2fywc.jpg > /img/group-banners/banner/39-afgmeq4hbsq7fmx2fywc.jpg > > where "39" is a asigned as group id as unique id for a file while > its uploading, and "afgmeq4hbsq7fmx2fywc" is set to > $group['Group']['photo_secret'] > > and I want to delete these files from controller on delete > function,... when I'm deleting group > > if($this->Group->delete($group['Group']['id'])) > { > $file = new File(WWW_ROOT > > ."/img/group-banners/original/$group['Group']['id']-$group['Group']['photo_secret'].jpg"); > $file = new File(WWW_ROOT > > ."/img/group-banners/banner/$group['Group']['id']-$group['Group']['photo_secret'].jpg"); > if($file->exists()) > $file->delete(); > > I'm getting an error: > Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, > expecting T_STRING or T_VARIABLE or T_NUM_STRING > > how can I do this,...? > > thanks in advance > chris > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google > Groups "CakePHP" group. > To post to this group, send email to [hidden email] > </user/SendEmail.jtp?type=node&node=5712225&i=0>. > To unsubscribe from this group, send email to [hidden email] > </user/SendEmail.jtp?type=node&node=5712225&i=1>. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > > > ------------------------------------------------------------------------ > If you reply to this email, your message will be added to the > discussion below: > http://cakephp.1045679.n5.nabble.com/delete-image-file-in-server-from-controller-tp5712207p5712225.html > > > To start a new topic under CakePHP, email > ml-node+s1045679n125572...@n5.nabble.com > To unsubscribe from CakePHP, click here > <http://cakephp.1045679.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1255722&code=YmlsbC5zdG9sdHpAYm9vc3RlcndlYnNvbHV0aW9ucy5jb218MTI1NTcyMnwtNTU0NTk2MTUy>. > NAML > <http://cakephp.1045679.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > > -- View this message in context: http://cakephp.1045679.n5.nabble.com/delete-image-file-in-server-from-controller-tp5712207p5712226.html Sent from the CakePHP mailing list archive at Nabble.com. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.