answersLogoWhite

0


Best Answer
If you mean uploading files...

HTML Form (front-end):


enctype="multipart/form-data">






PHP (upload_file.php)


if ($_FILES["file"]["error"] > 0)
??{
??echo "Error: " . $_FILES["file"]["error"] . "
";

??}
else
??{
??echo "Upload: " . $_FILES["file"]["name"] . "
";

??echo "Type: " . $_FILES["file"]["type"] . "
";

??echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB
";

??echo "Stored in: " . $_FILES["file"]["tmp_name"];
??}
?>

Thank You Google & w3schools (http://www.w3schools.com/php/php_file_upload.asp)
User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you upload function in php?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you install PHP scripts?

You need to upload the scripts to web hosting space that support PHP.


Can you sen a code to upload photo in javascript or php?

Please go to www.google.com, and search for "php upload photo script" or something alike. I'm sure you'll find somthing there.


How do you upload an image to MySQL using PHP?

You cant upload an actual picture to MySQL, you can upload the URL but not the picture itself. You would have to upload this to your site first and then send the link to MySQL


How does PHP function in applications?

in php used for one typ website


How do you use settime out in php?

we cant use set timeout function in php because it is of java script function


How do you return a value in a PHP function?

Below is a simple example of how you could return a value in a PHP function. <?php function returnme($value) { return $value; } echo returnme('hello'); // outputs: hello ?>


What is the way to create a function in PHP?

function function_name() { .................... }


What does the php function eval?

The eval() function evaluates a string as PHP code. http://us.php.net/manual/en/function.eval.php


How do you use a function with a button in PHP?

A simple function call <html> <body> <?php if(isset($_POST['button'])) { setValue(); // Function is called } function setValue() { echo "<br>The button property to call PHP function works"; // Your code here } ?> <input type="submit" name="button" onclick=<?php $_SERVER['PHP_SELF']; ?> /> </body> </head>


How do you create a PHP script?

To create a PHP script all you have to do is create a new file, then save the file as "filename.php". It must have a .php file extension.After that open the file and put in the PHP tags like shown.Then you write your PHP script within those tags and upload to your web space and check it out.


How do you change the current directory in PHP?

chdir() PHP function helps in changing the current directory.


What is the getopt function in PHP?

It gets options from the command line argument list. It can be used in PHP 4.3 and above, including PHP 5.