Forum Moderators: coopster
When I started I downloaded all the files from the server to my work Mac using Dreamweaver MX 2004 and simply edited some HTML on the odd PHP page and uploaded them back to the server once again via Dreamweaver MX 2004 but the whole page disappeared. For some reason the server didn't seem to be liking the
<?php//loads of PHP here
print <<<EOF
<html goes here />
EOF;
//more PHP code here
?>
and when I changed it to this
<?php//loads of PHP here
?>
<html goes here />
<?php
//more PHP code goes here
?>
Everything returned to normal. The only explanation I can think of is Dreamweaver is slightly modifying the EOF code. Could this be the case? Otherwise I am completely flummoxed. I've only been PHPing for less than a year so any help would be fantastic, also some explanations of the benefits of Print <<< EOF code would be really helpful.
There must be a setting in DW that is causing that conversion to happen. You may want to pose the question in the WYSIWYG and Text Code Editors [webmasterworld.com] to see if anybody there can help. Either that or search Macromedia's site for something.
And for your question of how print <<<EOF is helpful is if you are printing out a lot of html inside of a function that gets called more then once. Otherwise simply putting the html outside of php code works just fine.
In Dreamweaver> Preferences >Code Format there is an option to indent with 2 spaces automatically checked. Unchecking this solved everything. this was especially confusing as DW didn't appear to show any indentations and the code format looked identical with either settings so be warned.