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

Ask A Question

Stats

  • Questions 537k
  • Answers 537k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can only call members of an object directly when… May 17, 2026 at 1:40 am
  • Editorial Team
    Editorial Team added an answer Use the Enter and Leave events of the TextBox to… May 17, 2026 at 1:40 am
  • Editorial Team
    Editorial Team added an answer So the service endpoint URL was pointing to qa2automated...even though… May 17, 2026 at 1:40 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm building a text input field specialized for entering and editing times. One of
I want to customize the looks of the range input type in HTML5 to
I've created a custom UITableViewCell with a label and a text field. I want
I have two ways to check from user: 1.if user input (Amount field <
I'm trying to add a search box to my page that will direct users
I have a comparison I'd like to make more efficient in SQL. The input
I'm creating a web form, where in there are around 12-15 Input Fields... You
It seems as if read(0, buffer, 255) always returns 1 when reading. In my
Input: Graph G Output: several independent sets, so that the membership of a node
So I'm rendering a partial view in memory in order to direct the XSL-FO

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.