Hi friends,
How can we upload files in PHP? i want that user can be post own resume file through form. please tell me php script for that.
thanks for any reply.
Hi friends,
How can we upload files in PHP? i want that user can be post own resume file through form. please tell me php script for that.
thanks for any reply.
Create an Upload-File Form
form action="upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
Create The Upload Script
<?php
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "<br>";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br>";
echo "Type: " . $_FILES["file"]["type"] . "<br>";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
?>
Same coding is used for uploading php files as discussed by josephlimma.
Interesting and very informative , useful post. Thanks for sharing with us.
portable display stands | portable counters
is there any real thread with real discussion in this forum?
Hi Luceleng, above thread is real discussion, what kind of discussion and real thread you are looking for here.
<html>
<body>
<form action="upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
<html>
<body>
<form action="upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
</form>
<?php
if ($_FILES["file"]["error"] > 0) {
echo "Error: " . $_FILES["file"]["error"] . "<br>";
} else {
echo "Upload: " . $_FILES["file"]["name"] . "<br>";
echo "Type: " . $_FILES["file"]["type"] . "<br>";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
?>
</body>
</html>
Hi there,
Actually PHP is very demanded tool in SEO because that coding is very amazed for any content but no doubt that is to hard and complicated so that,s why mostly people avoid that because they don,t spent time for it because they don,y know about his very value able aspects that to batter for website growing with PHP .
Regards:
Sameer shokat.
I find it very helpful: http://www.w3schools.com/php/php_file_upload.asp. This can be helpful to you too.
thanks for the information that you share with us you can also read from w3schools.com
always check for open-source scripts on sourceforge and read the code to know how it works
Geekion.com | Pure SSD Hosting Provider | VPS Servers
Wix.com provides a free, easy-to-use online system that allows you create and post your own unique web page. Its highly effective modifying resources & personalized web page styles make building a wonderful web page simple.
|
Bookmarks