php forum
php mysql forum
php mysql smarty
 
Topic Options
#101068 - 04/09/00 08:48 AM Adding to a html file
BooTeK Offline
Member

Registered: 03/23/00
Posts: 33
Loc: The Netherlands
I want to add a extra line to a html file. At this moment I can add one line. But when a new line is added the old one it removed.

Does anyone have some code that could do this.
_________________________
bootek@arfweb.cjb.net

Top
#101069 - 04/10/00 07:46 PM Re: Adding to a html file
mickalo Offline
Junior Member

Registered: 06/09/00
Posts: 60
Loc: N.E Iowa
Where exactly did you want to add this line in the HTML file??

------------------
Mike(mickalo)Blezien
Thunder Rain Internet Publishing
Providing Personal/Business
Internet Solutions that work!
http://www.thunder-rain.com
Email: info@thunder-rain.com
_________________________
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://thunder-rain.com/
Tel: 1.712.395.0670
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Top
#101070 - 04/11/00 06:28 AM Re: Adding to a html file
BooTeK Offline
Member

Registered: 03/23/00
Posts: 33
Loc: The Netherlands
Well right about in the middle. But I don't want to replace the lines above it each time.

The document should be left as it is only with a extra line.

BooTeK
_________________________
bootek@arfweb.cjb.net

Top
#101071 - 04/11/00 07:45 AM Re: Adding to a html file
mickalo Offline
Junior Member

Registered: 06/09/00
Posts: 60
Loc: N.E Iowa
One way would be something like this:
code:
#############################################
# Define path to file
$HTML_file = "/path/to/HTML_file";

# Open HTML file to print output
open(FILE,"<$HTML_file") &#0124; &#0124; die "Can't open $HTML_file file";
@lines = <FILE>;
close(FILE);
foreach $line (@lines) {
# Insert the marker<!--INSERT--> in the HTML # page where you whant the
# new line printed in the file.
if ($line =~ /<!--INSERT-->/) {
print qq|the line you want here|;
exit;
}
else { chop ($line) if ($line =~ /n$/); print "$linen"; }
}
######################################

Hope this helps

------------------
Mike(mickalo)Blezien
Thunder Rain Internet Publishing
Providing Personal/Business
Internet Solutions that work!
http://www.thunder-rain.com
Email: info@thunder-rain.com
_________________________
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://thunder-rain.com/
Tel: 1.712.395.0670
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Top
#101072 - 04/13/00 06:36 AM Re: Adding to a html file
BooTeK Offline
Member

Registered: 03/23/00
Posts: 33
Loc: The Netherlands
Thanks man this helped a lot.
_________________________
bootek@arfweb.cjb.net

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks