web pages are just 'not rite'

J

John

for some reason, no doubt my ftp programs fault, some of my php files on my
web server have a line break between every line!
example
<?

echo "this";

if ($blah == "something) {

echo "something else";

}

?>

when it should be:
<?
echo "this";
if ($blah == "something) {
echo "something else";
}
?>

also, some files, instead of line breaks have boxes.
<?phpBOXecho "this";BOX

it doesnt seem to be affecting perforamnce but its annoying when trying to
edit files
 
H

Hywel Jenkins

for some reason, no doubt my ftp programs fault, some of my php files on my
web server have a line break between every line!
example

It's not a HTML issue - either your FTP client is fiddling with the
files during transfer, or your server is modifying the end of line
characters.
 
E

Eric Bohlman

for some reason, no doubt my ftp programs fault, some of my php files
on my web server have a line break between every line!

If you and your server are running different OSs (for example, Windows at
your end and Linux on the server), you need to make sure to set up your FTP
program to transfer text files (such as HTML, PHP, etc.) in "ascii" mode
and binary files (such as images) in "binary" mode. What's probably
happening is that Windows editors normally use a CRLF has the line
separator whereas Unix-family systems normally use just an LF. In "ascii"
mode a file uploaded from a Windows system to a Unix system will have each
CRLF translated to an LF and a file downloaded from a Unix system to a
Windows system will have each LF translated to a CRLF. But if, say, you
accidentally upload in binary mode and then download in ascii mode, you'll
wind up with CRCRLF or something similarly confusing.
 
B

brucie

It's not a HTML issue - either your FTP client is fiddling with the
files during transfer, or your server is modifying the end of line
characters.

that was also my thought. binary transfers should fix it.
 
C

Cameron

Hywel said:
It's not a HTML issue - either your FTP client is fiddling with the
files during transfer, or your server is modifying the end of line
characters.
Make sure your FTP client is uploading files in the correct format I.E.
ASCII or Binary.

~Cameron
 
T

Tina - AffordableHOST.com

John said:
for some reason, no doubt my ftp programs fault, some of my php files on my
web server have a line break between every line!


Make sure you're uploading in ASCII format.

--Tina
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top