PHP Code Reformatting... Wrongly!

S

Scott K

Frontpage, for some reason, thinks it knows more about PHP than I do. I insert a bit of code..
CODE: <img src=<? print("\"{$directoryComics}{$comic[$strip_id]}\" {$dimensions[3]}"); ?>"
and it changes it to..
CODE: <img src="<? print("/"{$directoryComics}{$comic[$strip_id]}/" {$dimensions[3]}"); ?>%22" ?>"

The first one is perfectly formatted and works fine. However, upon save, Frontpage changes the first line into the second. I am in Code view, and have disabled everything about Intellisense and code formatting I can find. Is there any way to either get it to stop this by turning off an option I just can't find, or a way to insert code literally so that Frontpage doesn't look at it at all? Thanks in advance

Scott
 
J

Jim Buyens

You can avoid these problems either of two ways:

o Configure PHP to look for <% and %> tags rather
than <? and ?>. This is an option in php.ini.

o In your code, use <script language="php"> and
</script> tags rather than <? and ?>.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------

-----Original Message-----
Frontpage, for some reason, thinks it knows more about
PHP than I do. I insert a bit of code...
CODE: <img src=<? print("\"{$directoryComics}{$comic
[$strip_id]}\" {$dimensions[3]}"); ?>">
and it changes it to...
CODE: <img src="<? print("/"{$directoryComics}{$comic
[$strip_id]}/" {$dimensions[3]}"); ?>%22" ?>">
The first one is perfectly formatted and works fine.
However, upon save, Frontpage changes the first line into
the second. I am in Code view, and have disabled
everything about Intellisense and code formatting I can
find. Is there any way to either get it to stop this by
turning off an option I just can't find, or a way to
insert code literally so that Frontpage doesn't look at
it at all? Thanks in advance!
 
S

Stefan B Rusynko

And there are some PHP addins for FP that will help at http://www.microsoft.com/frontpage/downloads/addin/default.asp




| You can avoid these problems either of two ways:
|
| o Configure PHP to look for <% and %> tags rather
| than <? and ?>. This is an option in php.ini.
|
| o In your code, use <script language="php"> and
| </script> tags rather than <? and ?>.
|
| Jim Buyens
| Microsoft FrontPage MVP
| http://www.interlacken.com
| Author of:
| *----------------------------------------------------
| |\---------------------------------------------------
| || Microsoft Office FrontPage 2003 Inside Out
| ||---------------------------------------------------
| || Web Database Development Step by Step .NET Edition
| || Microsoft FrontPage Version 2002 Inside Out
| || Faster Smarter Beginning Programming
| || (All from Microsoft Press)
| |/---------------------------------------------------
| *----------------------------------------------------
|
|
| >-----Original Message-----
| >Frontpage, for some reason, thinks it knows more about
| PHP than I do. I insert a bit of code...
| >CODE: <img src=<? print("\"{$directoryComics}{$comic
| [$strip_id]}\" {$dimensions[3]}"); ?>">
| >and it changes it to...
| >CODE: <img src="<? print("/"{$directoryComics}{$comic
| [$strip_id]}/" {$dimensions[3]}"); ?>%22" ?>">
| >
| >The first one is perfectly formatted and works fine.
| However, upon save, Frontpage changes the first line into
| the second. I am in Code view, and have disabled
| everything about Intellisense and code formatting I can
| find. Is there any way to either get it to stop this by
| turning off an option I just can't find, or a way to
| insert code literally so that Frontpage doesn't look at
| it at all? Thanks in advance!
| >
| >Scott
| >.
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top