תוכן CyberBot - HWzone פורומים
עבור לתוכן
  • צור חשבון

CyberBot

משתמש רשום
  • מספר הודעות

    777
  • הצטרפות

  • ביקר לאחרונה

הודעות שנפתחו על-ידי CyberBot

  1. בכלל השכן שלי מזה שקרן

    פעם אחת הוא סיפר לי שהוא ניסה למכור את הפלאפון שלו אז הקונה(הגיע עם הפמליה שלו[לכאורה]) לא רצה לשלם לו את הסכום שהוא סגר איתו אז הוא קרא לאח שלו והוא ואח שלו פיצצו את כולם במכות עם קרשים ושלחו אותם לאישפוז וכל זה קרה 5 מטר מהבית שלי

  2. תודה שניסיתם

    רק עוד שאלה איך מכניס את הקישור של התמונה בתוך text area

    ואני רוצה לשים אותו בתוך וראיציות שונות של קישור לדוגמא :שיהיה בקוד לקישור לפורומים ולקוד HTML וקוד ישיר!

    אני מאוד אודה לכם

  3. שלום יש לי אתר לעלאת תמונות שלא מזמן פתחתי יש עכשיו כמה בעיות

    Notice: Undefined index: userfile in /www/host2.nu/u/p/l/uploadpro/htdocs/index.php on line 37

    והוא מביא לי die בלי קשר

    כתובת האתר (עדיין בבניה)

    http://uploadpro.host2.nu/

    והקוד:


    <!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "[url]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/url]
    <html xmlns="[url]http://www.w3.org/1999/xhtml"[/url] xml:lang="en" lang="en">
    <html>
    <head>
    <link rel="stylesheet" type="text/css" href="style.css" />
    <title>Uplaod-Pro</title>
    </head>
    <body>
    <div class="wrapper">
    <div class="box">
    <ul>
    <li><a href="index.php">ראשי</a></li>
    <h2>העלאת תמונות</h2>
    <form action="" method="post" enctype="multipart/form-data">
    <p>
    <label for="file">בחר קובץ:</label> <input type="file" name="userfile" id="file"> <br><br>
    <button>העלה!</button>
    <p>
    *יש לעלות עד 2 מ"ב(MB)
    <br>
    *רצוי ששם הקובץ יהיה באנגלית כדי שלא יהיו בעיות
    <br>
    <?php
    // Configuration - Your Options
    $allowed_filetypes = array('.jpg','.gif','.bmp','.png'); // These will be the types of file that will pass the validation.
    $max_filesize = $max_filesize = 2000000; // Maximum filesize in BYTES (currently 2.0MB).
    $upload_path = './files/'; // The place the files will be uploaded to (currently a 'files' directory).
    $filename = $_FILES['userfile']['name']; // Get the name of the file (including file extension).
    $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); // Get the extension from the filename.
    // Check if the filetype is allowed, if not DIE and inform the user.
    if(!in_array($ext,$allowed_filetypes))
    die('The file you attempted to upload is not allowed.');
    // Now check the filesize, if it is too large then DIE and inform the user.
    if(filesize($_FILES['userfile']['tmp_name']) > $max_filesize)
    die('The file you attempted to upload is too large.');
    // Check if we can upload to the specified path, if not DIE and inform the user.
    if(!is_writable($upload_path))
    die('You cannot upload to the specified directory, please CHMOD it to 777.');
    // We'll start handling the upload in the next step
    if(move_uploaded_file($_FILES['userfile']['tmp_name'],$upload_path . $filename))
    echo 'Your file upload was successful, view the file <a href="' . $upload_path . $filename . '" title="Your File">here</a>'; // It worked.
    else
    echo 'There was an error during the file upload. Please try again.'; // It failed
    ?>
    <br>
    </div>
    </div>
    </form>
    </head>



×
  • צור חדש...