|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdits unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Frustration with FTP + notepad + php
Hey guys,
Now I know this is not a PHP-specific issue, but I have a really annoying problem! I'm using LeapFTP + windows notepad to upload php scripts to a server. Anyway, LeapFTP has an option where you can right click the file that is on the server, goto "edit"... it loads the PHP file in windows notepad. you can edit the file, then save it, go back to leapftp and hit the "upload now" button Anyway, my php scripts lose all of their formatting & the scripts are broken because it will put stuff on the same line & smush it all together. so if I have something like //2-2-03 this script does stuff require("file.php") it will convert it to //2-2-03 this script does stuffrequire("file.php") and smudge everything together like that. It does this randomly. sometimes it saves my new lines & spacings fine, but other times it smudges it together. I have my FTP program to make *.php files upload as ASCII, i'm on windows XP using a cable modem any suggustions? -pete |
|
#2
|
|||
|
|||
|
shot answer: LeapFTP is ok. Itīs notepadīs fault. try using wordpad instead, it can deal with unix line-ends.
also switching to binary transfer would solve the problem.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#3
|
|||
|
|||
|
Pete,
Do you have "Word Wrap" enabled in the Format menu of Notepad? I have never experienced any problems with Notepad when editing PHP files. You might want to look at a better text editor - one that I would personally recommend is UltraEdit: http://www.ultraedit.com Good luck with Notepad, however, and let me know how you get on. Best Regards, - Chris |
|
#4
|
|||
|
|||
|
I suggest taking a look at Notetab, a freely available and very great text editor that will make you wish Notepad was off your system. Find it and all its wonderful capabilities at URL
|
|
#5
|
|||
|
|||
|
ASCII or Binary?
sorry for the double post, the devshed forums are acting weird for me.
Last edited by gashad : February 15th, 2003 at 03:38 PM. |
|
#6
|
|||
|
|||
|
ASCII or Binary?
M.Hirsch,
You said, Quote:
I thought you're always supposed to have text transfered as ASCII & stuff like images/program files transfered as binary. Does anyone have more info on that? (or a link to a good article) Cmaxwell: It's not wordwrap--It doesn't even have to be w/ a php file, I've had it happen with HTML several times, for instance. Sometimes I will edit a file, then when I actually save the file, everything gets corrupted. Thanks, -Pete PS: I downloaded NoteTab--it's a nice program! |
|
#7
|
|||
|
|||
|
Quote:
if you transfer as ASCII, the line ends are translated, i.e. in windows a line ends with \r\n (13, 10), in unix you only have a \n. Notepad cannot deal with \n only, but wordpad, homesite and many others can. It used to be (afaik) that unix webservers would require you to send ASCII and translate the line ends because they were not able to deal with the additional #13 . this does not apply to html, but to scripts. But today all script interpreters that i know of donīt care if you are using unix or windows line-ends. |
|
#8
|
|||
|
|||
|
I've had the same problem myself. Try using a program like Textpad. A fully working demo version is available. If you save under a PC file format initially in textpad then it will always open proprely in notepad. So you wont have to have notepad on the computer you edit the site from! (:
|
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > Frustration with FTP + notepad + php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|