Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 920053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:38:44+00:00 2026-05-15T18:38:44+00:00

when i do a direct input feild as text the input comes through fine

  • 0

when i do a direct input feild as text the input comes through fine but when i change the input feild type to “FILE” and then read the temp contents stored on the server it adds extra characters that are “unknown”

$fileName = $_FILES['userfile']['name'];
$tmpName  = $_FILES['userfile']['tmp_name'];
$fileSize = $_FILES['userfile']['size'];
$fileType = $_FILES['userfile']['type'];

$fp = fopen($tmpName, 'r');
$content = fread($fp, $fileSize);
fclose($fp); 

echo $content;

Its most probably to do with secuirty but how do i change the content so it reads normal? In firefox it comes up with square boxes for most characters with the letters:
Here is an example:

Its meant to say:
“Dirty Rocker” but instead comes out like this: “D�i�r�t�y� �R�o�c�k�e�r”

Hope you can help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:38:46+00:00Added an answer on May 15, 2026 at 6:38 pm

    Set data type in form to multipart/form-data. Set encoding of output page to utf-8 through header and meta tag.

    Check real contents of uploaded file. Compair original file and its copy on the server. Try to upload file manually (though ftp, for example) and read it by php.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<?php echo validation_errors(); ?> <?php echo form_open('verifylogin'); ?> <label for=username>Username:</label> <input type=text size=20 id=username
I have an input element in HTML markup as below: <input type=text name=s id=s
Can you direct me how can i access input data of DetailsView in ItemUpdating
I'm building a text input field specialized for entering and editing times. One of
When using HTML5 email fields — <input type=email/> — a lot of UAs (user
In bash, there are multiple ways to direct input and output. For example, these
I'm trying to get all the direct reports of a User through Active Directory,
I'm unable to activate direct input mode on devices that don't support pointer events.
How we can take input from the file in the Eclipse? Just like we
Hi guys im wanting to use direct input in my c# program so that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.