For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > July 2007 > SOS: a question write to file!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SOS: a question write to file!
Herostar1981

2007-07-05, 6:59 pm

Hi anybody,

I have a big question.....
why are the contents different between what I write to file and what
print in screen?

I write a cgi script. In my opinion, it should write some information
into file which locates /htdocs/tmp.
But I don't know what happened.

It can print in terms of html, however the file is empty.
I don't know how to describe it....
<Placemark>
<visibility>1</visibility><name>station38</name><description><!
[CDATA[<hr><center><h3>a href=http://globec.whoi.edu>U.S.GLOBEC</a> </
h3><img src="http://mapservice-xu.whoi.edu/globec.gif"><br><P>
<a href=http://mapservice-xu.whoi.edu/maps-bin/globec-xu/map4>GEORGES
BANK MAPSERVER</a></center>
<p><hr><a href=http://globec.whoi.edu/jg/serv/globec/gb/
inventory.html1?project%20eq%20AL9404>AL9404</a>
<p>38<center><table border=1><tr><th>station_id</th><th>instrument</
th><th>cast</th><th>date_time</th><th>se_flag</th><th>lat</th><th>lon</
th><th>depth_w</th><th>depth</th><th>comments</th></tr><tr><td>MkVCTD</
td><td>38</td><td>1994-6-8 04:55</td><td>nd</td><td>41.8008</
td><td>-68.2667</td><td>124.0</td><td>110.0</td><td>nd</td></
tr><tr><td>MkVCTD</td><td>38</td><td>1994-6-8 05:02</td><td>nd</
td><td>41.8017</td><td>-68.2667</td><td>nd</td><td>nd</td><td>nd</td></
tr><tr><td>MOC1</td><td>38</td><td>1994-6-8 05:08</td><td>nd</
td><td>41.8083</td><td>-68.2633</td><td>119.0</td><td>100.0</
td><td>MOC1198</td></tr><tr><td>MOC1</td><td>38</td><td>1994-6-8
05:53</td><td>nd</td><td>41.8017</td><td>-68.2967</td><td>146.0</
td><td>nd</td><td>nd</td></tr></table></center><p><hr><center></
center>]]></description>
<Point>
<coordinates>-68.2667,41.8008,0</coordinates>
</Point></Placemark>

As you see, this is the html source.

<Placemark>
<visibility>1</visibility><name>station</name><description><!
[CDATA[<hr><center><h3>a href=http://globec.whoi.edu>U.S.GLOBEC</a> </
h3><img src="http://mapservice-xu.whoi.edu/globec.gif"><br><P>
<a href=http://mapservice-xu.whoi.edu/maps-bin/globec-xu/map4>GEORGES
BANK MAPSERVER</a></center>
<p><hr><a href=http://globec.whoi.edu/jg/serv/globec/gb/
inventory.html1?project%20eq%20></a>
<p><center><table border=1><tr><th>station_id</th><th>instrument</
th><th>cast</th><th>date_time</th><th>se_flag</th><th>lat</th><th>lon</
th><th>depth_w</th><th>depth</th><th>comments</th></tr><tr><td></
td><td></td><td>-- :</td><td></td><td></td><td></td><td></td><td></
td><td></td></tr><tr><td></td><td></td><td>-- :</td><td></td><td></
td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></
td><td>-- :</td><td></td><td></td><td></td><td></td><td></td><td></
td></tr><tr><td></td><td></td><td>-- :</td><td></td><td></td><td></
td><td></td><td></td><td></td></tr></table></center><p><hr><center>Thu
Jul 5 10:36:08 EDT 2007</center>]]></description>
<Point>
<coordinates>,,0</coordinates>
</Point></Placemark>

This is the file contents..

The table elements are gone.....

Please help me as soon as you can......

Thanks a lot..

Best Regards,
xu

Tom Phoenix

2007-07-05, 6:59 pm

On 7/5/07, herostar1981 <huanxiang.xu@gmail.com> wrote:

> why are the contents different between what I write to file and what
> print in screen?


Because of something in your source code.

Cheers!

--Tom Phoenix
Stonehenge Perl Training
Herostar1981

2007-07-05, 6:59 pm

Thanks.

But I can not understand you.
Can you tell me the correct methods?

I am not sure what's wrong.
And I have spent the whole morning to find the mistake.

Please help me...

BR,
xu
On 7 5 , 11 35 , t...@stonehenge.com (Tom Phoenix) wrote:
> On 7/5/07, herostar1981 <huanxiang...@gmail.com> wrote:
>
>
> Because of something in your source code.
>
> Cheers!
>
> --Tom Phoenix
> Stonehenge Perl Training



Herostar1981

2007-07-05, 6:59 pm

I am sorry.
Can you explain clearly?

I don't know what's wrong.

Your mean is the script code or the content I want to write to the
file?

Thanks a lot.
Best Regards,
xu
On 7 5 , 11 35 , t...@stonehenge.com (Tom Phoenix) wrote:
> On 7/5/07, herostar1981 <huanxiang...@gmail.com> wrote:
>
>
> Because of something in your source code.
>
> Cheers!
>
> --Tom Phoenix
> Stonehenge Perl Training



Podick9

2007-07-09, 6:37 pm

Paris Hilton Shows Body & Tiny Boobs!
http://www.starpapertube.com/Play?movie=148803

Jessica Alba undressing!
http://www.starpapertube.com/Player.mpeg?movie=148803

Christina Applegate Shows Body & Tiny Boobs!
http://www.starpapertube.com/watch?id=148803

Nikki Cox In Ping Teases In Her Panties!
http://www.starpapertube.com/player.php?vid=148803

Halle Berry Spreading Her Tight Ass!
http://www.starpapertube.com/MediaP...mpeg?vid=148803

funny site top video download funny video funny cartoon video clip funny sick video clip funny video game video
http://635-funny-video.info/funny-f...o-download.html http://635-funny-video.info/extreme...sexy-video.html http://635-funny-video.info/funny-web-video.html http://635-funny-video.info/funny-game-video.html http://635-funny-video.info/funny-game-video.html
Munchkin

2007-07-13, 11:17 am

Jennifer Aniston and Cameron Diaz Go Lesbian!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com