[PHP] Ftp a file--errors in rendered page, Ftp the file again--works fine. Huh?

2006-11-23 Thread Nicholas Crosby
Hello:

I would appreciate any help on this that someone might have. A student of
mine found this issue. He ftp's a file to a server and looks at it through a
browser, there are errors. He uploads the file again, it works fine. I am
stumped. Any ideas? Here is the text of the file that he is uploading.
Basically, if you add some more text to the bottom and upload it, the page
will not generate the proper output.

html
head
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
titleHello, World!/title
/head
body
p align=centerfont size=24 face=Arial color=#4040F0
?php
// Helloworld.php
// This is my first PHP program.
include(header.htm);
echo Hello,World!;
echo /font;
echo p align='right'font face='verdana' size='12' color='#123456';
echo br /Hello,World!;
echo /font;
echo p align='left'font face='verdana' size='6' color='#abcdef';
echo br /Hello,World!;
echo /font;
include(footer.htm);
?
/p
This is a bunch of text that has been added.
This is some more text that has been added.
centerPage 1 a href=includes2.phpPage 2/a a
href=includes3.phpPage 3/a/center
this is some more text.
/body
/html

This is the source for the generated page:

html
head
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
titleHello, World!/title
/head
body
p align=centerfont size=24 face=Arial color=#4040F0
font face=verdana, size=7 color=123456
Includes are Cool!!/font
hr /Hello,World!/fontp align='right'font face='verdana' size='12'
color='#123456'br /Hello,World!/fontp align='left'font
face='verdana' size='6' color='#abcdef'br /Hello,World!/font
hr
centerMark Woynarski/centerbr
centerComp204/centerbr
centercopy; 2006 Mark Woynarski.  Unauthorized redistribution is subject
to an ass-kicking./center
/p
centerPage 1 a href=includes2.phpPage 2/a a
href=includes3.phpPage 3/a/center
this is some more text.
/body
/htmler
this is some more text.
/body
/htmlr
this is some more text.
/body
/html


Notice that there are 3 sets of ending body / html tags.

If you upload the file a second time, the page is generated with only one
set of body/html tags.

Any ideas?

Thanks in advance.

nick
[EMAIL PROTECTED]

Nick

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Ftp a file--errors in rendered page, Ftp the file again--works fine. Huh?

2006-11-23 Thread Travis Doherty
Nicholas Crosby wrote:

Hello:

I would appreciate any help on this that someone might have. A student of
mine found this issue. He ftp's a file to a server and looks at it through a
browser, there are errors. He uploads the file again, it works fine. I am
stumped. Any ideas? Here is the text of the file that he is uploading.
Basically, if you add some more text to the bottom and upload it, the page
will not generate the proper output.
  

The file is uploaded using an FTP client or it is uploaded using PHP's
FTP functions?

If I understand correctly, it sounds like the FTP client is having
troubles uploading the file.  Try to minimize the script and see if you
can still reproduce:

?php
echo htmlbodyHello/body/html;
?

If you upload a script like that, does it get something simple done
correctly or does that also require a second upload?

Travis

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php