I am getting error at the second line of the code, what is the problem :-/
$content = '<' . '?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?' . '>';
$content .= "<entry xmlns='http://purl.org/atom/ns#'>";
$content .= "<title mode='escaped' type='text/plain'>".$title."</title>";
$content .= "<issued>".$issued."</issued>"
$content .= "<generator url='http://www.yoursitesurlhere.com'>client's name</generator>";
$content .= "<content type='application/xhtml+xml'>";
$content .= "<div xmlns='http://www.w3.org/1999/xhtml'>".$body."</div>";
$content .= "</content>";
$content .= "</entry>";
concatenation
$content .= "code";
$content .= "code";
$content .= "code";
Creates one logical line,
missing semi-colon after " creates a second line, and a syntax error
almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
i tried this:
$content = '<?xml version="1.0" encoding="utf-8" standalone="yes"?>';
$content .= "<entry xmlns='http://purl.org/atom/ns#'>";
$content .= "<title mode='escaped' type='text/plain'>".$title."</title>";
$content .= "<issued>".$issued."</issued>";
$content .= "<generator url='http://www.yoursitesurlhere.com'>client's name</generator>";
$content .= "<content type='application/xhtml+xml'>";
$content .= "<div xmlns='http://www.w3.org/1999/xhtml'>".$body."</div>";
$content .= "</content>";
$content .= "</entry>";
and there were no errors on my server.
kkeith29
Nearly a Posting Virtuoso
1,357 posts since Jun 2007
Reputation Points: 235
Solved Threads: 194
you are missing a quotation on this line:
$your_password="xxx; // change this to your blogger login password
kkeith29
Nearly a Posting Virtuoso
1,357 posts since Jun 2007
Reputation Points: 235
Solved Threads: 194
You must change your code on line 25 like this:
$content = "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>";
rudevils
Junior Poster in Training
80 posts since Jan 2008
Reputation Points: 10
Solved Threads: 10
My suggestion is to ditch whatever editor you are using, and set up an editor with code highlighting
the missing quotes, semicolons and other syntax errors would then be highlighted while you are editing.
almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376