Previous Thread
Next Thread
Print Thread
Rate Thread
#101068 04/09/2000 8:48 AM
Joined: Mar 2000
Posts: 3
Member
Member
Offline
Joined: Mar 2000
Posts: 3
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.

Sponsored Links
#101069 04/10/2000 7:46 PM
Joined: Jun 2000
Posts: 13
Junior Member
Junior Member
Offline
Joined: Jun 2000
Posts: 13
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

#101070 04/11/2000 6:28 AM
Joined: Mar 2000
Posts: 3
Member
Member
Offline
Joined: Mar 2000
Posts: 3
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

#101071 04/11/2000 7:45 AM
Joined: Jun 2000
Posts: 13
Junior Member
Junior Member
Offline
Joined: Jun 2000
Posts: 13
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") | | die "Can't open $HTML_file file";
@lines = ;
close(FILE);
foreach $line (@lines) {
# Insert the marker in the HTML # page where you whant the
# new line printed in the file.
if ($line =~ //) {
print qq|the line you want here|;
exit;
}
else { chop ($line) if ($line =~ /n$/); print "$linen"; }
}
######################################

Hope this helps [Linked Image]

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

#101072 04/13/2000 6:36 AM
Joined: Mar 2000
Posts: 3
Member
Member
Offline
Joined: Mar 2000
Posts: 3
Thanks man this helped a lot.

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)