Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 15th, 2005, 11:08 AM
Authorized User
 
Join Date: Jan 2004
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Ashleek007
Default File upload problem!

Fatal error: Call to undefined function: do_upload() in /home/fhlinux196/a/askmultimedia.co.uk/user/htdocs/Failsworth/resourcesADD1.php on line 231

This is the function: -
function do_upload($upload_dir, $upload_url) {

    $temp_name = $_FILES['userfile']['tmp_name'];
    $file_name = $_FILES['userfile']['name'];
    $file_type = $_FILES['userfile']['type'];
    $file_size = $_FILES['userfile']['size'];
    $result = $_FILES['userfile']['error'];
    $file_url = $upload_url.$file_name;
    $file_path = $upload_dir.$file_name;

This is the lines 230-235: -
if ($_FILES['userfile']) {
    $message = do_upload($upload_dir, $upload_url);
}
else {
    $message = "Invalid File Specified.";
}

I cant understand why this isnt working as it has worked on other projects, but this one?! The only difference is that im using CSS, which i cant see affecting the upload process?!

Thanks for any help
Ash;)


My new web design domain
www.askmultimedia.co.uk
__________________
My new web design domain
www.askmultimedia.co.uk





Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload File problem khb3283 ASP.NET 2.0 Basics 1 October 3rd, 2008 01:14 PM
Problem to upload file imjigu2001 ASP.NET 2.0 Professional 2 March 26th, 2008 04:37 AM
File Upload Problem meetravig Pro JSP 0 July 14th, 2007 01:34 AM
strange file upload problem dan195 ASP.NET 1.0 and 1.1 Basics 0 January 28th, 2007 12:36 AM
Multiple file upload problem suchita_sindhu .NET Framework 1.x 0 September 8th, 2006 03:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.