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
Did you know?Explore Trending and Topic pages for more stories like this.
$im=new images();
//Sends headers and images don't work
echo "hello";
//New rect
$us=$ge->rect("Title");
$us->setDimensions(300,300);
$us->setBgColor('#606060');
$us->createImage();
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
40
Other forums
Read from forum
Haven't written anything forever and I would like to get back.
What I'm trying to do is getting t
Remove values in array2 from array1
I have two arrays.
Array 1 is where the array key holds various different numbers. For exampl
Multipe Dynamic Controls & AutoPostback Issue
I currently have a need to create many dynamic controls (Example Textboxes) that need to do a PostBa
List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab
SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built
PHP & Java
Hello,
can PHP code be used inside java code?
Code: <SCRIPT LANGUAGE="Java
button help
i originally had this but realised it is much easier to have a button.
Code: <?php
Sessions Value Not Saved
Hi,
Im making a login form and im using this code:
Code: if($login=="true"){
Converting RGB values to HEX
Code: <?PHP
$file_handle = fopen("colors/rgb.csv", "r");
wh
Greek characters in php
Hi,
I'm making a script and I m using for first time greek characters.
I started to write