![]() |
Programmers or any others i got a ?
K
Need to setup a page that will grab the contents of file and list it . The page it grabs is a txt file.... How can i do this? Use a SSI includes? |
I dont know sorry, but can I put my sig in one of Juicys threads anyway please :glugglug
|
Quote:
|
a simple php page:
$fileToGrab = '/path/to/file.txt'; print ( implode('',file($file) ); if you don't need any special formatting. |
Quote:
|
make sure you make note of how i didn't reference the second "file" variable correctly becuase I'm retarded
$fileToGrab = ''; print (implode('',file($fileToGrab))); |
Quote:
|
Quote:
|
PHP Code:
thats what i got |
You dumping to an HTML window ?
Try this: $fileToGrab = "juicy.txt"; print ( preg_replace("/\n/","<br>",implode("",file($fileToGrab))) ); might not be the most elegant, but it should work. |
Quote:
<? print nl2br(implode("",file("juicy.txt"))); ?> |
Quote:
|
niceeeeeeeeee
Now ill set up a cron job to update the php file. |
All times are GMT -7. The time now is 12:40 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123