I don’t see an error on line 354. Make sure that you are using
straight “typewriter” single-quotes to surround the date format
string, and if it still complains, try adding the second argument
(optional time) like this:
date('Ymd',time());
But the fact that it’s throwing an error on line 354 leads me to
suspect that you have a line-ending problem, because I do see a frank
error on line 356, and if the PHP interpreter is telling you that it’s
on line 354, then your code is being interpreted as one long line.
Look in the Document Setup / Output tab and make sure your document is
outputting the code in Unix Linefeed format, not (Classic) Mac format.
Then, fix this:
print '
You have enclosed single-quotes inside of single-quotes. Further on
down the same section of your code, you use double-quotes, which is
fine. If you enclose a string variable in single-quotes, then any
quotes you use inside that variable must either be double-quotes or
“escaped” single-quotes. Otherwise, you end the variable prematurely
and end up with this error.
$foo = 'Jimmy's bicycle is red.'; //good
$foo = 'Jimmy's bicycle is red'; //bad
$foo = "Jimmy's bicycle is red"; //good
$bar = ""Just drive, she said!" -- Stan Ridgeway"; //good
$bar = '"Just drive, she said!" -- Stan Ridgeway'; //good
$bar = ""Just drive, she said!" -- Stan Ridgeway"; //bad
Walter
On Nov 14, 2009, at 7:15 AM, hugh wrote:
Hi Walter,
Just trying this out and the page is getting an error…
Parse error: syntax error, unexpected T_STRING in /Volumes/
Formac_120Gb_Webserver/BISHBASH.COM/test/shopcopy.php on line 354
Line 354 is:
$now = date(‘Ymd’); // makes 20091113 today
The whole of your php chunk as I’ve added into a markup item comes
out as:
<?php
$now = date('Ymd'); // makes 20091113 today
if($now > 20091115){ // the 12th of December, when the course is held
print '
';
}else{
print 'image src="Resources/finished.gif" alt="Finished"';
}
Hugh
_______________________________________________
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options