Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion delete image "file" in server from controller

Received: by 10.66.75.100 with SMTP id b4mr7054108paw.35.1352731905185;
        Mon, 12 Nov 2012 06:51:45 -0800 (PST)
X-BeenThere: cake-php@googlegroups.com
Received: by 10.68.201.133 with SMTP id ka5ls24966837pbc.3.gmail; Mon, 12 Nov
 2012 06:51:03 -0800 (PST)
Received: by 10.68.131.8 with SMTP id oi8mr5308436pbb.15.1352731863807;
        Mon, 12 Nov 2012 06:51:03 -0800 (PST)
Date: Mon, 12 Nov 2012 06:51:02 -0800 (PST)
From: Chris <chris...@yahoo.com>
To: cake-php@googlegroups.com
Message-Id: <9c8266d0-3db9-4405-8a8e-466fb69ca219@googlegroups.com>
In-Reply-To: <eb062d5c-7e5a-46f9-bf05-3eb59a6c6908@googlegroups.com>
References: <eb062d5c-7e5a-46f9-bf05-3eb59a6c6908@googlegroups.com>
Subject: Re: delete image "file" in server from controller
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_22_12351917.1352731862696"

------=_Part_22_12351917.1352731862696
Content-Type: multipart/alternative; 
	boundary="----=_Part_23_30958015.1352731862696"

------=_Part_23_30958015.1352731862696
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

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
>
>
------=_Part_23_30958015.1352731862696
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

no one,...???&nbsp;<br><br>On Sunday, November 11, 2012 4:24:25 PM UTC-8, C=
hris wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div><br></div><div=
>hi guys,... can someone help me please,...&nbsp;</div><div><br></div><div>=
I got image files in server:&nbsp;</div><div><br></div><div>/img/group-bann=
ers/original/<wbr>39-afgmeq4hbsq7fmx2fywc.jpg</div><div>/img/group-banners/=
banner/39-<wbr>afgmeq4hbsq7fmx2fywc.jpg&nbsp;</div><div><br></div><div>wher=
e "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'<wbr>]=
</div><div><br></div><div>and I want to delete these files from controller =
on delete function,... when I'm deleting group&nbsp;</div><div><br></div><d=
iv>&nbsp; &nbsp; &nbsp; if($this-&gt;Group-&gt;delete($<wbr>group['Group'][=
'id']))</div><div>&nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nb=
sp;$file =3D new File(WWW_ROOT ."/img/group-banners/original/<wbr>$group['G=
roup']['id']-$group['<wbr>Group']['photo_secret'].jpg");</div><div>&nbsp; &=
nbsp; &nbsp; &nbsp;$file =3D new File(WWW_ROOT ."/img/group-banners/banner/=
$<wbr>group['Group']['id']-$group['<wbr>Group']['photo_secret'].jpg");</div=
><div>&nbsp; &nbsp; &nbsp; &nbsp;if($file-&gt;exists())</div><div>&nbsp; &n=
bsp; &nbsp; &nbsp;$file-&gt;delete();</div><div><br></div><div>I'm getting =
an error:&nbsp;</div><div>Parse error: syntax error, unexpected T_ENCAPSED_=
AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING&nbsp;</div=
><div><br></div><div>how can I do this,...?&nbsp;</div><div><br></div><div>=
thanks in advance&nbsp;</div><div>chris</div><div><br></div></blockquote>
------=_Part_23_30958015.1352731862696--

------=_Part_22_12351917.1352731862696--