Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Feb 2003
    Location
    England
    Posts
    1
    Member #
    658
    I need PHP help, today (feb 12th)!

    I have a system that currently allows users to upload images to a website. I need it adapted for use on another site, but to allow .doc and .txt file uploads only!

    Should be a relatively simple task for competent PHPers. Prepared to pay!

    Get in touch ASAP via msn messnger (ferretwright@vodafone.net) or ICQ (121219726) if you can help!

    Thanks!

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    There's already an upload tutorial here if it helps.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Member
    Join Date
    Nov 2002
    Location
    Elmira, NY
    Posts
    41
    Member #
    261
    try this


    PHP Code:

    <?php
    if(!is_uploaded_file($pic1file))
    {
    die(
    "Nice try buddy");
    }
    ?>

    <?php
    $accepted_types 
    = array('image/gif''image/jpeg''image/pjpeg');

    if(!
    in_array($pic1file_type$accepted_types))
    {
    die(
    "Only the following types are accepted: " implode(', '$accepted_types));
    }
    ?>


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:58 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com