Jump to content

PHP files in Notepad error


ProblemHelpPlease

Recommended Posts

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 :D

Link to comment
Share on other sites

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 ;)

real_programmers.png

Link to comment
Share on other sites

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/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.