Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
cómo encontrar la longitud del archivo de texto que carga el usuario

Guíame para encontrar la cantidad de caracteres que están presentes en el archivo de texto que subo. Este código mostrará los caracteres que están presentes en el archivo .txt`

 <!DOCTYPE html> <html> <head> <title>File Reader</title> </head> <body> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data"> <input type="file" name="file" size="60" accept=".txt" /> <input type="submit" value="Show Contents" /> </form> <?php if ($_FILES) { $fileName = $_FILES['file']['tmp_name']; $file = fopen($fileName, "r"); while (!feof($file)) { echo fgets($file) . ""; } while (!feof($file)) { echo fgetc($file); } fclose($file); } ?> </body> </html>
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

podrías usar

 $_FILES['userfile']['size']

esto le da el tamaño, en bytes, del archivo cargado.

http://www.php.net/manual/en/features.file-upload.post-method.php

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!