I'm currently just beginning to learn PHP and it appears that BBEdit
added code that conflicts.
I created a new XHTML 1.0 Transitional doc in BBEdit 8.2.4, input some
simple php code in the body and uploaded to my web server.
When viewing the page in Safari, I get the following error:
Parse error: parse error, unexpected T_STRING in
/usr/local/www/vhosts/carolinacoastalconnections.com/htdocs/first.php on
line 1
After looking at my doc and looking at the example in the book (PHP and
MySQL For Dynamic Web Sites), I realized that BBEdit added:
<?xml version="1.0"?> to line 1. So my code looks like:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Blank PHP Script</title>
<meta name="generator" content="BBEdit 8.2" />
</head>
<body>
<?php
echo 'Hello World!';
?>
</body>
</html>
I removed <?xml version="1.0"?> from line 1, uploaded the script, and
presto - no parse error.
Can someone tell me why BBEdit added the code to line 1?
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>