ProblemHelpPlease Posted August 27, 2008 Share Posted August 27, 2008 I do most of my php coding using notepad and quite happily create, upload and modify php files with no problem. The problem is that when my friend opens the same file from the server and modifies it then re-uploads, if I then reopen the file he has edited the code is garbled with the little squares that are caused when notepad can't recognise a character or line return. My Friend has exactly the same PC, operating system, FTP software as I have so I can't understand why this is happening. I have to keep opening things in wordpad then saving them, uploading them and then opening again in notepad. My Friend is able to open any file in notepad without a problem. Any got any ideas how to fix this? (so I can still use notepad) I wondered if it was related to file associations or ascii - binary upload methods? Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/ Share on other sites More sharing options...
Mchl Posted August 27, 2008 Share Posted August 27, 2008 Is there any reason you have to use Notepad? Might not sound like a solution but: switch to Notepad++ Generic Notepad is just too inconvenient. Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/#findComment-626776 Share on other sites More sharing options...
Fadion Posted August 27, 2008 Share Posted August 27, 2008 Probably your friend is using the built-in text editor of the FTP software, which may result in garbage characters. I would suggest you both get some decent editors as there are a lot free around: Aptana Studio and Eclipse PDT to name a few. Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/#findComment-626867 Share on other sites More sharing options...
Mchl Posted August 27, 2008 Share Posted August 27, 2008 NetBeans 6.5, quite usable though still in beta. Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/#findComment-626872 Share on other sites More sharing options...
Fadion Posted August 27, 2008 Share Posted August 27, 2008 NetBeans 6.5, quite usable though still in beta. I can see from their website that it doesn't support PHP. So no code coloring, hinting and such. Maybe I'm wrong. Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/#findComment-626999 Share on other sites More sharing options...
Mchl Posted August 27, 2008 Share Posted August 27, 2008 As of 6.5 it does. Trust me. I'm using it Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/#findComment-627001 Share on other sites More sharing options...
ProblemHelpPlease Posted August 27, 2008 Author Share Posted August 27, 2008 Thanks for the recommendations but I prefer to use notepad as I find other editors just add clutter and buttons that I never end up using. If we both use wordpad then I don't experince a problem so that would suggest that some difference between notepad and wordpad is causing the problem. Could this be something to do with RTF or charater encoding? Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/#findComment-627004 Share on other sites More sharing options...
discomatt Posted August 27, 2008 Share Posted August 27, 2008 This is caused by a different encoding or alternate linebreaks. Get a better text editor, notepad is crap - even for basics. EditPad Lite works great if you don't need syntax highlighting or hints, quite lightweight and a few handy features. And never ever ever use wordpad or any other rich-text editor for programming.... PLEASE Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/#findComment-627006 Share on other sites More sharing options...
Mchl Posted August 27, 2008 Share Posted August 27, 2008 Notepad++ adds very little 'clutter' and has some huga advantages over Notepad. Code coloring, multiple file editing (with search and replace), and what can be most important for you with proper encoding (you can choose whether you want your file in ASCII or in UTF8). I used it for several years until I switched to NetBeans very recently. Now I know I'll never go back. At least not for large projects. NetBenas check your syntax while you write the code (I haven't forgot a semicolon; since I moved) , offers code hints and what's very important, allows jumping to class/function code by just clicking on its name in the list. No more scrolling! They say there's also a PHP debugger built in, but I didn't manage to get it working. Anyways. I think you should at least give Notepad++ a try. A comic for you Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/#findComment-627013 Share on other sites More sharing options...
ProblemHelpPlease Posted August 27, 2008 Author Share Posted August 27, 2008 I have tried using Notepad ++ before but find that while using notepad may generate more errors in my code, by finding and fixing them myself I end up learing PHP much faster and in more depth. Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/#findComment-627015 Share on other sites More sharing options...
Mchl Posted August 27, 2008 Share Posted August 27, 2008 If you can afford the time... Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/#findComment-627017 Share on other sites More sharing options...
discomatt Posted August 27, 2008 Share Posted August 27, 2008 notepad++ will not have a debugger involved, so you'll still have to fix errors And mchl -> the syntax checking while you write is 'real-time debugging' = NetBean's PHP debugger. Most good IDEs allow you to plug compile-time debuggers ( such as Zend ) in them for additional debugging. If you like NetBeans, you should give PDT ( Eclipse ) a quick look - Developed by Zend and IBM http://www.zend.com/en/community/pdt http://www.eclipse.org/pdt/ Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/#findComment-627020 Share on other sites More sharing options...
Mchl Posted August 27, 2008 Share Posted August 27, 2008 They say you can plug in X-Debug to do run-time debugging (like stack trace, watches etc.) I also tried Eclipse, but I couldn't get used to it. Quote Link to comment https://forums.phpfreaks.com/topic/121537-php-files-in-notepad-error/#findComment-627022 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.