•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 373,468 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,991 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 559 | Replies: 1 | Solved
![]() |
•
•
Join Date: Dec 2007
Posts: 52
Reputation:
Rep Power: 1
Solved Threads: 1
sry i'm not really familiar with $_FILES. but i have a quick question. why isnt this uploading?
here's my code:
here's my code:
<?php
$file = rand(10,100) . $_FILES["file"]["name"];
if ((($_FILES["file"]["type"] == "application/octet-stream"))
&& ($_FILES["file"]["size"] < 400000))
{
if ($_FILES["file"]["error"] > 0)
{
echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Upload: " . $file . "<br />";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
if (file_exists("themes/" . $file))
{
echo $file . " already exists. ";
}
else
{
move_uploaded_file($file,
"themes/" . $file);
echo "Stored in: " . "themes/" . $file;
}
}
}
else
{
echo "Invalid file. Must be .ptf.";
}
?>•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 1,899
Reputation:
Rep Power: 9
Solved Threads: 216
I see you marked your post as solved. Did you find solution? Would you mind to share it with Daniweb community?
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Similar Threads
- Boxes???? (Graphics and Multimedia)
- How To Upload in PHP (PHP)
- php error HELP!!! (PHP)
- PHP Error (PHP)
- Mysql num rows(): Invalid argument (PHP)
- Hello Dani Web members (PHP)
- Invalid System Disk error on install (Storage)
Other Threads in the PHP Forum
- Previous Thread: Newby to PHP here.... (Google Analytics)
- Next Thread: Help on Deleting files from server- no database



Linear Mode