answersLogoWhite

0

Imageuploading in PHP using OOP

Updated: 8/16/2019
User Avatar

Wiki User

15y ago

Best Answer

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

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Imageuploading in PHP using OOP
Write your answer...
Submit
Still have questions?
magnify glass
imp
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 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 do you output a star using PHP?

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


Can you use an ASP textbox using PHP?

No


How do you connect sqlserver with HTML?

using php


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.