Tuesday, May 29, 2012

Text instead of pictures

Text instead of pictures 

Hi

I am using the code
class SignupsController extends AppController {
public $ name = 'Signups';
public $ uses = array ('Signup');
public $ helpers = array ('Html', 'Form');
public $ components = array ();
public $ useTable = false;

public function image ($ width = '120 ', $ height = '40', $ characters = '6 ') {
$ this-> autoRender = false;
         $ this-> layout = 'none';
         $ this-> autoLayout = false;
$ image = @ imagecreate ($ width, $ height) or die ('Cannot initialize new GD image stream');
header ("Content-Type: image / jpeg");
imagejpeg ($ image);
imagedestroy ($ image);

}
in version 1.3.15 this code to display an image, but in version 2.1.3 there is no picture, see the attachment 


cakephp v 2.1.3

cakephp v 1.3.15


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: