Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[PHP]plz solve error in script of imagehosting

Featured Replies

Here's my code;

PHP

<?php

ini_set("upload_max_filesize", "8mb");

// $userfile is where file went on webserver

$userfile = $HTTP_POST_FILES['userfile']['tmp_name'];

// $userfile_name is original file name

$userfile_name = $HTTP_POST_FILES['userfile']['name'];

// $userfile_size is size in bytes

$userfile_size = $HTTP_POST_FILES['userfile']['size'];

// $userfile_type is mime type e.g. image/gif

$userfile_type = $HTTP_POST_FILES['userfile']['type'];

// $userfile_error is any error encountered

$userfile_error = $HTTP_POST_FILES['userfile']['error'];

// userfile_error was introduced at PHP 4.2.0

// use this code with newer versions

// put the file where we'd like it

$upfile = 'upload/'.$userfile_name;

// is_uploaded_file and move_uploaded_file

if (is_uploaded_file($userfile))

{

if (!move_uploaded_file($userfile, $upfile))

{

echo '<p><strong>Error:</strong> Could not move file to destination directory.<p>';

exit;

}

} else {

echo '<p><strong>Error:</strong> Possible file upload attack. Filename: '.$userfile_name.'</p>';

}

echo '<p>Success! File uploaded successfully. Filename: '.$userfile_name.'.</p>';

?>


Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.