Linked Questions
15 questions linked to/from Read a plain text file with php
-1
votes
1
answer
4k
views
fopen(c:\dorian.txt): failed to open stream: No such file or directory [duplicate]
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
Trying to echo all lines of texts in a .txt [duplicate]
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....
-3
votes
1
answer
2k
views
Resource ID #2? [closed]
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;
0
votes
1
answer
2k
views
Import data from TXT to table in HTML with PHP
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 ...
-1
votes
1
answer
1k
views
Creating Html table using text file data
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
Load data from php file into python
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[...
0
votes
3
answers
786
views
How do I get every line from a text file and put it in a website table?
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
How to get data from a file in codeception
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
How to get a line in a txt file and echo it out?
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 ...
0
votes
1
answer
157
views
Clean up closed caption (text) file for processing
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
PHP readfile() printing issue
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 ...
1
vote
1
answer
90
views
PHP fopen and is_dir issue
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 ...
-1
votes
1
answer
95
views
what is the best way to read a text file avoiding text editor issue in php?
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 ...
0
votes
2
answers
67
views
How to replace text of cities on webpages from a file on FTP, where I have all cities
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
PHP operetions from foreach output
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 ...