Jump to content

Color Help Please


jokerfool

Recommended Posts

You got a good point there, I changed that, anyways it doesnt give me an error, just doesnt display the outputted file results, the text file is in the same directory.

 

I changed it to this:

 

$myFile = "text.txt";
$fh = fopen($myFile, 'r');
echo $myFile;

Link to comment
https://forums.phpfreaks.com/topic/193462-color-help-please/#findComment-1018502
Share on other sites

I just tested this:


$test = file_get_contents('test.txt');
echo $test;

 

With a test.txt in the same directory with the word test inside it. The word was echoed without a problem. I did the test cause I never work with txt files so I wanted to be sure. Either it's not in the same directory, your file name is wrong, or there isn't anything in the txt file.

Link to comment
https://forums.phpfreaks.com/topic/193462-color-help-please/#findComment-1018505
Share on other sites

HTML is a free-form language, in that it doesn't preserve whitespace by default. To force it to preserve it you can rap the text in a <pre> tag, or apply white-space:pre; to the wrapper element's CSS... Assuming you meant to preserve tab characters and the like?

Link to comment
https://forums.phpfreaks.com/topic/193462-color-help-please/#findComment-1018516
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.