Pedro Chagas
asked on
php - read file and show the content
Hi E's, I need to know how I read a .htm file and show the contain line by line?
The best regards, JC
The best regards, JC
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Does cyberstalker's reply answer your question or do you need more help?
ASKER
Hi again, just one thing for finish:
I get the last code of @cyberstalker, and they work well, the script give me each line in differente arrays.
The problem is when I show the array, the data appear like the real site, if I have a link, appear the link but not the code.
You can check in the attach image.
How I can see the real code of the file?
Regards, JC
I get the last code of @cyberstalker, and they work well, the script give me each line in differente arrays.
The problem is when I show the array, the data appear like the real site, if I have a link, appear the link but not the code.
You can check in the attach image.
How I can see the real code of the file?
Regards, JC
<?php
$lines = explode("\n", file_get_contents('indexes.htm')); ?>
<pre>
<?
print_r($lines);
?>
</pre>
04-10-2011-19-17-29.png
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
In this case, if I want write other file with the code I get from the old file, I can?
Regards, JC
Regards, JC
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It's possible put the data in array, like each line in array?
The best regards, JC