answersLogoWhite

0

Imageuploading in PHP using OOP

User Avatar

Anonymous

16y ago
Updated: 8/16/2019

It is possible to have an image upload object. You will simply create a class that takes the parameters required for an upload and pass it the upload resource given by the relevant $_FILES[''] superglobal.

For instance one could use code like the following when calling this class:

// Give the constructer the directory

$uploader = new Upload("../galleryimages"); into which to upload.

// The rest of the params.

$notice = $uploader->uploadimage($_FILES['fileupload'], UPLOAD_TYPE_IMAGES, 220, 188, UPLOAD_KEEP_ASPECT);

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Is PHP object oriented?

Yes - 'advanced' PHP programming uses Object Oriented Programming (OOP).


What are the differences between Java OOP and PHP OOP?

JAVA is an Object Based Programming Language. it doesn't provide multiple inheritance and operator overloading. while Object Oriented Lanuages provides both.


Does android supports PHP?

It supports websites made on php but not coding in php. There are workarounds for coding in PHP using Android.


Is Answers.com coded using PHP or ASP?

If you're referring to Answers.com, it's built using PHP as a backend.


How do you add a comment in PHP?

< ?php // This is an example of comment in PHP /* This is another example of comment in PHP and we can write comments in multiple lines using this method */ ? >


Why do we use Php?

PHP is an Open Source Scripting Language. We can create Web Pages and Web Applications using PHP.


How do you output a star using PHP?

type this in a file save it as something.php and then run it <?php echo '*'; ?>


How to display a variable in PHP using echo or print statements?

displaying a variable in php using echo statement? <?php $name="ram"; //declaring and defining the variable echo "$name"; //printing the variable using echo command ?>


How can files be converted into HTML using PHP?

To rename a file in PHP the easiest way to do it is to use the rename() function. <?php rename("before.txt", "after.html"); ?>


How do you create a web mail script using PHP?

You can use phpMailer() Or, you can use mail() PHP function to send emails via PHP script.


What is the Malay-utf-8.inc. php file?

This particular file is a file specific to the PHP program or script you are using. It is not a "php system file".


Can you use an ASP textbox using PHP?

No