Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 5th, 2007, 11:10 AM
Authorized User
 
Join Date: May 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to kaos_frack
Default how do i determine size of file being uploaded?

is it possible to identify the size of a file that is being uploaded?
if yes, what if there are several files being uploaded?
tnx

Reply With Quote
  #2 (permalink)  
Old January 6th, 2007, 01:29 AM
hit hit is offline
Registered User
 
Join Date: Jan 2007
Location: Indore, MP, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can the following lines help you??

<?php
    if(isset($_POST['submit'])){
        echo "File Size: ". filesize($_FILES['testfile']['tmp_name']). " bytes";
    }
?>
<html>
    <body>
        <form method="post" action="" enctype="multipart/form-data">
            <input type="file" name="testfile" />
            <input type="submit" name="submit" value="submit" />
        </form>
    </body>
</html>
Reply With Quote
  #3 (permalink)  
Old January 10th, 2007, 06:27 AM
Authorized User
 
Join Date: Dec 2006
Location: Burla, Orissa, India.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to paagle
Default

$sizevariable = filesize('filename');
is the code do anythin u want to after this................

---
Paagle
TEAM LEADER-Team Xuberance(http://www.xuberance.com)
Reply With Quote
  #4 (permalink)  
Old January 10th, 2007, 03:48 PM
Authorized User
 
Join Date: May 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to kaos_frack
Default

Quote:
quote:Originally posted by hit
 Can the following lines help you??
it sure does, thanks a lot!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get Path of uploaded file in JSP murulikblr JSP Basics 0 April 17th, 2007 02:05 AM
Verifying uploaded File Size in Client-side Ushhh ASP.NET 1.0 and 1.1 Professional 5 August 30th, 2006 07:13 AM
deleting a file after it is been uploaded yts007 Dreamweaver (all versions) 1 August 16th, 2006 01:05 AM
Read an uploaded Excel File rekha_jsr Classic ASP Basics 0 June 12th, 2005 10:17 PM
Uploaded a cvs file via phpMyAdmin from a PocketPC bourdett PHP How-To 0 January 8th, 2005 12:19 PM



All times are GMT -4. The time now is 04:00 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.