Can I call a class inside a function?


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

I have a class written in another file that handles my image resizing.

Can I do this (php says I can't calling a non-existent class), but I know its there becuase the require doesn't fail above

Did you know?Explore Trending and Topic pages for more stories like this.
Code: [Select]<?php
<?php
require_once("image_load.php");
...
....

function image_upload($tmp_name,$imgid){

$image = new easyImageEdit();
$image->load(UPLOADS.$tmp_name);
$image->resizeToWidth(250);
}
?>
No comments posted yet

Your Answer:

Login to answer
146 Like 19 Dislike
Previous forums Next forums
Other forums

Upload file!
Ok i have a form..
Code: <form name="form1" method="post" action=&quo

How can I get my program to read a larger array ??
Hi:

I have this program that reads from an array to do calculations. The array are just t

php or sql?
Sorry not sure if this is a sql problem or php the following code is supposed to delete data from th

Loop column after 2 results
Hello All.

Here is what I have:

Client ID Company name Clien

Passing PHP variables from one page to another
Hello-

I'm having trouble figuring out how to transport a variable from one php file to anoth

DataTable Help Required
Hi all I am creating an app that utilises and MS Access back end and queries it quite a bit at vario

Refining of search Criteria
Dear Friends

I need a help, I have a search page which of cars related, which has different s

Sub-domains & calling unique content
Hello,

Is there a way use something similar to the $_GET function for a sub-domain? I to be a

have trouble in a if condition
The if below is working ok, it check when indexes, name, zipcode and state are empty.
Code: &

session checking in page load
hai all I have a web site is www.Mryas.com in this my login page is Page1.aspx its co

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