Linked Questions

15 questions linked to/from Read a plain text file with php
-1 votes
1 answer
4k views

HOW IS THIS DUPLICATE? The solution in "can-i-read-a-txt-file-with-php" does not work for me, because the code itself is fine, the error is because of the file path, I've tried different approaches, ...
2 votes
2 answers
537 views

Here is my php code <?php $myFile = "hidata.txt"; $fh = fopen($myFile, 'r'); $theData = fgets($fh); fclose($fh); echo ('<li>' . $theData . '</li>'); ?> and here is what in my hidata....
Sadie's user avatar
  • 35
-3 votes
1 answer
2k views

Why when it displays does it say Resource id #2? All I am doing is fetching a simple number (0) out of a .txt file: $num = fopen('qnum/qnum.txt', 'r'); echo $num;
Jace's user avatar
  • 9
0 votes
1 answer
2k views

I must import file (example of this file in attachment) from .txt file to table in html (with 5 columns) to PHP document. I want to except the first column, whic added now to my table (Lp. and numbers ...
Paweł G.'s user avatar
-1 votes
1 answer
1k views

I want to make a html table using text file data. Since I am new to web designing I dont know which approach would be best. It would be great if anyone would give me pointers on what to do.
0 votes
1 answer
875 views

I have a huge php file that contains a number of arrays <?php $quadrature_weights = array(); $quadrature_weights[2] = array( 1.0000000000000000, 1.0000000000000000); $quadrature_weights[...
mortysporty's user avatar
  • 2,911
0 votes
3 answers
786 views

I have a text file while contains a variable amount of lines and each line contains 3 things, an IP, browser info and a date. Basically it's a visitor log that contains these things. I want to take a ...
2 votes
0 answers
596 views

I'm quite new to codeception and I'm not sure how to accomplish this. Searching the documentation I did find the command $I->openFile('composer.json'); that belongs to the Filesystem module, but ...
0 votes
1 answer
143 views

I have a txt file containing some temperatures: 26 C 25.06 C 25.00 C 25.00 C 25.00 C 25.00 C 24.94 C 24.94 C 24.94 C 24.94 C 24.94 C 24.94 C And I want those lines to be echo ...
GahaGaha's user avatar
0 votes
1 answer
157 views

I need help cleaning up a text file using PHP. The file is being processed afterwards by another function that requires the text to be formatted in a certain way. Original closed caption text: 1 00:...
-1 votes
1 answer
105 views

I'm trying to read a local text file in PHP, and I have the line of code so that it does read the file, however it echos it when I don't want it to? $teacher1department = readfile("dir/test.txt"); I ...
Hugh Chamers's user avatar
1 vote
1 answer
90 views

I have a small page to check if a network share is up. To do so, the user can had a share in a txt file (easier than touching the code itself) and then the page will read the text file and check if ...
alizou's user avatar
  • 13
-1 votes
1 answer
95 views

The code below are working, but! when the sample text file was edited in other version of text editor.. it wont!! What is the very best way to read text line by line without the text editor issue ...
Bee's user avatar
  • 309
0 votes
2 answers
67 views

I want to generate text into websites based on some conditions. I will create about 100 HTML pages with some text, but there will be some parts of text that will change based on different city. I need ...
0 votes
1 answer
94 views

I have this php code, this I have allready tried: <?php foreach (glob("somefolder/*/*/wdl.txt") as $somevar) {include $somevar;} ?> and this code output this: WIN DRAW LOSE WIN WIN DRAW WIN ...