Current location: Hot Scripts Forums » Programming Languages » PHP » Dreamweaver problem for PHP experts


Dreamweaver problem for PHP experts

Reply
  #1 (permalink)  
Old 06-01-09, 02:05 AM
namecomp namecomp is offline
Newbie Coder
 
Join Date: Apr 2009
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Question Dreamweaver problem for PHP experts

A coder helped me made a php file, I opened it in notepad, edited a few things, then when I save it, EVERYTHING are squeezed into one big continuous line, that has thousands of characters, in one line.

Before i open it, they are all neatly spaced, in multiple tabbed lines. What function in dreamweaver is responsible for that?
Reply With Quote
  #2 (permalink)  
Old 06-01-09, 04:43 AM
=OTS=G-Man =OTS=G-Man is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
What happened is notepad for some reason didn't save the newline characters in normal windows \r\n format.

theres two ways to fix it

1) open it in WordPad WordPad has better newline reading and may be able to open it like it was before. If it does just save it using the [b]Save As..[b] function and choose the option "Text Document" on my vista system it has that option and also "Unicode Text Document" But I think is was worded different in XP, but look for ANSI if its there.

2) in Dreamweaver open the file and choose "Commands->Apply Source Formatting" and that should fix it. I think. I'm not sure if Dreamweaver will actually format PHP, it only does HTML formatting
Reply With Quote
  #3 (permalink)  
Old 06-01-09, 04:47 AM
=OTS=G-Man =OTS=G-Man is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
real quick, if none of that works, I found this prettyprinter.de you have to play with the options to suite your formatting taste.
Reply With Quote
  #4 (permalink)  
Old 06-01-09, 07:20 AM
namecomp namecomp is offline
Newbie Coder
 
Join Date: Apr 2009
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
It worked perfectly! Thanks so much >.<
Reply With Quote
  #5 (permalink)  
Old 06-02-09, 05:08 AM
=OTS=G-Man =OTS=G-Man is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Glad I could help, Mind telling us what option you used.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hopefully simple problem for the JS experts... MikeTheVike JavaScript 0 08-15-08 01:02 PM
Dreamweaver and testing server problem!? user1001 Web Servers 2 01-08-07 02:59 PM
Local Server - Dreamweaver MX 2004 problem mcrob PHP 1 10-27-05 01:34 PM
Issues surrounding ASP.NET, Dreamweaver, and SP2 jsabarese ASP.NET 23 08-19-05 08:33 PM
problem with tags in dreamweaver mx file chrisschulze HTML/XHTML/XML 2 06-02-04 01:38 PM


All times are GMT -5. The time now is 08:36 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.