To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Tools > Dreamweaver

Dreamweaver In need of help with Dreamweaver?

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-16-2003, 03:36 AM   #1
mancroft
Junior Member
 
Join Date: Jun 2003
Posts: 16
Problem editing PHP pages in Dreamweaver

Someone I am working with has been editing PHP pages in Dreamweaver which mucks up the PHP by, for example, changing <?php to <!--p or something similar.

Is it possible to successfully edit PHP pages in Dreamweaver?
mancroft is offline   Reply With Quote
Old 07-16-2003, 03:51 AM   #2
jazappi
Member
 
Join Date: Jul 2003
Location: Kansas City
Posts: 96
Which version of Dreamweaver are you using?

I know in MX the integrated HomeSite Code Editor within Dreamweaver and it is setup to handle some PHP. You can also go into Edit --> Preferences and find the Code Format in that screen there is a tag library editor. You can customize code there so it doesn't reformat it.

Question is, Is it worth it? Nope. Go get HomeSite and edit them by hand coding, works better and you don't have to worry about that auto code monkey Dreamweaver had running around jacking up your code.

Peace!
jazappi is offline   Reply With Quote
Old 07-16-2003, 08:40 AM   #3
Weedpacket
Custom User Title™
 
Weedpacket's Avatar
 
Join Date: Aug 2002
Location: Rapid Offensive Unit "Foreign Object Damage"
Posts: 19,126
Moving this to a manifestly more appropriate forum.
__________________
On two occasions I have been asked [by Members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
Weedpacket is offline   Reply With Quote
Old 07-16-2003, 08:49 PM   #4
mzanimephp
genki ni shitemashitayo
 
mzanimephp's Avatar
 
Join Date: Dec 2002
Location: California
Posts: 274
Thumbs down BULL!

Quote:
Originally posted by jazappi

I know in MX the integrated HomeSite Code Editor within Dreamweaver and it is setup to handle some PHP. You can also go into Edit --> Preferences and find the Code Format in that screen there is a tag library editor. You can customize code there so it doesn't reformat it.
Thats the hard way of solving this problem. DWMX has support for PHP so as long as your file has a ".php" extension it will not change your opening and closing <?php ?> tags.

The only reason DWMX will change your code is if it thinks you have bad HTML. So (in MX) go "Edit" > "Preferences" > "Code Rewriting" Tab > And Uncheck everything. Hit OK.

And just like that - it won't change your code again, ever. Even if it is bad code.

Quote:
Originally posted by jazappi

Question is, Is it worth it? Nope. Go get HomeSite and edit them by hand coding, works better and you don't have to worry about that auto code monkey Dreamweaver had running around jacking up your code.
Question is, Is that a good idea? Nope. Not if your using DWMX. (Thats like throwing away your XBox and buying a Gameboy instead.)

If you are using DW4 or older then yes. Because DW4 and older was before they added support for PHP. Homesite is now owned by Macromedia and all future support for that now-dead program will be given BY Macromedia. Through Dreamweaver MX.
__________________
Scripting PHP, one line at a time | My web site
mzanimephp is offline   Reply With Quote
Old 07-17-2003, 07:11 PM   #5
crag
Junior Member
 
Join Date: May 2003
Location: Ft. Lauderdale
Posts: 5
Go to (on OSX) Preferences ->Code Rewritting. Make sure .php is in the "Never Rewrite Code" field and check the box. DWMX will never rewrite your code. period.
crag is offline   Reply With Quote
Old 07-17-2003, 07:23 PM   #6
DigitalDesign
Member
 
Join Date: Apr 2003
Location: Montenegro
Posts: 33
Is it possible to incorperate php into dreamweaver templates?
DigitalDesign is offline   Reply With Quote
Old 07-17-2003, 07:31 PM   #7
crag
Junior Member
 
Join Date: May 2003
Location: Ft. Lauderdale
Posts: 5
yes you can incorporate PHP in DWMX templates. but, my experience is that it's dicey.DWMX is unstable on OSX. So it crashes a lot when updating templates in a large site.

I use PHP includes instead.
crag is offline   Reply With Quote
Old 07-17-2003, 07:31 PM   #8
mzanimephp
genki ni shitemashitayo
 
mzanimephp's Avatar
 
Join Date: Dec 2002
Location: California
Posts: 274
Yeah you can do this. But sometimes if you have PHP above the <html> tag DWMX will remove it, so as I said earlier you have to turn off the code rewrite feature.
__________________
Scripting PHP, one line at a time | My web site
mzanimephp is offline   Reply With Quote
Old 07-17-2003, 07:35 PM   #9
mzanimephp
genki ni shitemashitayo
 
mzanimephp's Avatar
 
Join Date: Dec 2002
Location: California
Posts: 274
Quote:
Originally posted by crag
yes you can incorporate PHP in DWMX templates. but, my experience is that it's dicey.DWMX is unstable on OSX. So it crashes a lot when updating templates in a large site.

I use PHP includes instead.
crag, what version of OS X do you have? I use DWMX templates on OS X and it never crashes on me. Then too, I suppose this all has to do with RAM. I've got about 760mb of RAM and it still seems a bit bulky and slows other apps down a tad when its open.
__________________
Scripting PHP, one line at a time | My web site
mzanimephp is offline   Reply With Quote
Old 07-17-2003, 07:46 PM   #10
crag
Junior Member
 
Join Date: May 2003
Location: Ft. Lauderdale
Posts: 5
I'm running OSX 10.2 on a Dual PowerMac (Dual G4) with 1.25 GB RAM. DW crashes all the time. I get a JavaScript error or a whole slew of errors that end with an Out of Memory error. I've reported this on the MM usernet and all I get are people telling me to delete the temp direcotry (_mmServerScripts). This only happenes if I use DW to create recordsets and the like. Sometimes I end up having to recreate a page. So I've given on using DW for any PHP work. I write most of it. The errors are also scattered. Happen with different sites at different times.
crag is offline   Reply With Quote
Old 07-17-2003, 07:58 PM   #11
mzanimephp
genki ni shitemashitayo
 
mzanimephp's Avatar
 
Join Date: Dec 2002
Location: California
Posts: 274
Well you certainy have enough RAM then. Do you have OS 10.2.6? If not, that might help.

If you don't have the DWMX 6.1 update you might want to get that too. It fixes a whole slew of bugs. http://www.macromedia.com/software/d...aver/download/

Also, can you upload a page that causes your DWMX to crash? I want to see if I get the same effect and/or troubleshoot.
__________________
Scripting PHP, one line at a time | My web site
mzanimephp is offline   Reply With Quote
Old 07-17-2003, 09:22 PM   #12
crag
Junior Member
 
Join Date: May 2003
Location: Ft. Lauderdale
Posts: 5
I have updated DW and I have 10.2.6. And yeah sure I'll upload a page.

Very straight forward page. All DW code and if I open the recordset in DW (using the bindings panel) I get:

Tyoe Error: patternMatch has no properties

and it degrades from there. I have to esc then quit. This does not happen all the time. But I don't get it, cause there are no no DW extensions on this page. just 3 queries that I applied in DW. This why I do everything by hand now. Which is better I think anyway. You won't be able to test this page unless i give you a table schema.. but here it is anyway: (attached)
Attached Files
File Type: zip edit_linen.php.zip (3.0 KB, 73 views)
crag is offline   Reply With Quote
Old 07-18-2003, 01:12 AM   #13
mzanimephp
genki ni shitemashitayo
 
mzanimephp's Avatar
 
Join Date: Dec 2002
Location: California
Posts: 274
Yeah, it looked fine to me. That's some advanced code - but I didn't see anything that looked screwy. I think there must be some kind of conflict in the SQL database which chokes DWMX.
__________________
Scripting PHP, one line at a time | My web site
mzanimephp is offline   Reply With Quote
Old 07-18-2003, 01:20 AM   #14
crag
Junior Member
 
Join Date: May 2003
Location: Ft. Lauderdale
Posts: 5
Nope. besides the table having a lot of fields (I didn't design it) I don't see anything wrong either. I thinkk it has something to do with the DW connection to my testing server. But I can live with it. Like I said, except for recordsets most of the code is now written by hand.

thanks for looking...
crag is offline   Reply With Quote
Reply

Bookmarks


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

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
Forum Jump


All times are GMT -4. The time now is 02:40 AM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.