Drawing Images in classes

Posted on 16th Feb 2014 07:03 pm by admin

I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other content on the page.

Code: include('images.php');
//New Image set
$im=new images();

//Sends headers and images don't work
echo "hello";

//New rect

There are 2 classes; images which extends rect. In the createImage() it draws an image on index.php?img=0 but only if no other headers are sent yet.
Code: function createImage(){
if ($_GET['img']==$this->id){
Code: imagepng($this->im);
ImageDestroy ($im);}
Is there anyway to draw this objects and also have content. I tried to see if I could draw the images through the images class like images.php?img=0 but that didn't work. I was also thinking if there was a way to send an if back to index from constructor and destructor. This is probably really confusing sorry, an help is appreciated

No comments posted yet

Your Answer:

Login to answer
241 Like 40 Dislike
Previous forums Next forums
Other forums

problem with sql querry in php script
Hello guys,

What I want to do is I want to read out a csv file and then but te conent ot the

serializing objects - loses methods - the point being?

I know that serializing an object will lose the methods. But whats the point in that? What

Echo Tweaking help!
HI. I would like to have the output of the entered variables repeat forever, but it's stopping at th

how to remove in php string display
My code is $message="We're looking at developing our website."; $body= "My mess

Help to integrate whois Domain Details to website

can i know is their any php script r methods to add domain details to my website.

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS

Play Free Quiz and Win Cash