Forum Moderators: coopster
It didn't work. Then I rewrote this exact piece using a basic text editor (i.e. Notepad), uploaded it and it worked. Is there some setting in dreamweaver mx that inputs strange formatting into the code. I know programs like MSWord does this but I don't the work around to this. Any help would be appreciated.
[edited by: jatar_k at 12:16 am (utc) on Sep. 8, 2003]
[edit reason] generalized url and email [/edit]
always good to see another canadian. ;)
A developer I work with uses mx to do a little bit of php, though I try to discourage it, and I have never had a problem getting it to run. Whem we use non php extensions he sometimes gives me files with an extension that is not parsed by our servers (htm) but aside from that I am not aware of any problems.
Try to analyze all the steps you took, maybe it was some other part of the procedure that was the problem. Sorry I can't give more insight.
I've been creating php pages as HTML rather than using the suggested PHP (the options that MX gives you when you select "New")
jatar - the default extension is htm but you can change it to whatever you want.
echo "<meta http-equiv='Refresh' content='1;
URL=http://www.myothersite.com/index.html'>";
echo "<meta http-equiv='Refresh' content='1' URL=http://www.myothersite.com/index.html'>";
might work better. Not the closing single quote on content='1' and removal of the semi.
So, hard to say if it is dreamweaver or this snippet. Getting any run time errors?
WBF
Are you maybe having trouble with line endings? That can break PHP code fast, while the HTML & CSS still work.
Make sure Dreamweaver is set to use whatever line endings (e.g., CRLF, LF) that your Web server expects.
I apologize for my ignorance. But what are CRLF and LF's?
vkimura
PS-I have some code working now. I don't know what wrong with some of the php code but when I rewrote it in Notepad then it worked. I don't have any problems currently. Very strange. If I come up with a specific problem I'll be sure to post it. Thanks for all the feedback!
No apology is necessary -- I should have been more clear. But yes, you should learn about line endings, or they'll bite you:
LF "Line Feed" is the (typical) line ending for Unix (including Mac OS X)
CRLF "Carriage Return, Line Feed" is the line ending for Windows
CR "Carriage Return" is the line ending for MacOS 9 and previous.
Linefeed is ASCII character 10
Carriage Return is ASCII character 13
Most text editor (I think DreamWeaver included) can save files with any of these line endings in case you plan to upload it to a server of that platform.
If your document is saved with Unix line endings, Windows will consider (basically) as one long line. That won't usually break HTML, but it will break PHP, as well as most other code.
But when you look at it in your editor, it may look exactly like the code that works.