User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 429,970 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,577 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 868 | Replies: 3
Reply
Join Date: Nov 2006
Posts: 6
Reputation: jcisml is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
jcisml jcisml is offline Offline
Newbie Poster

parse error: parse error, unexpected $ in /www

  #1  
Feb 22nd, 2007
Hi,
I have a webpage that displays different info at different times of day,
it worked fine until i put flash on my page,
i used tutorial on how to remove "click to activate" in updated IE.
here: http://www.gerozahn.de/click-workaround/

then I tried to use my code to display different info according to time,
i used this code, which works fine without "click to activate" fix:
<?php
$hour = date('G'); //This outputs the current hour in 0 - 23 (24 hour format)
if($hour >= 21 || $hour <= 0)
{
?>
........................my webpage..............................
}
else
{
?>
........................another webpage.......................
 


then I tried to use "click to activate" fix with the above code like this:

<?php
  ob_start();
?>
<?php
$hour = date('G'); //This outputs the current hour in 0 - 23 (24 hour format)
if($hour >= 21 || $hour <= 0)
{
?>
........................webpage with flash..............................
}
else
{
?>
........................another webpage with flash.......................
<?php
  include_once "replaceObjEmbed.php";
  echo replaceObjEmbed(ob_get_clean());
?>     <------ parse error here, unexpected $

i even tried to switch them around but still i get the parse error,
"click to activate" fix works fine on a single page though
please help!
thank you
Last edited by jcisml : Feb 22nd, 2007 at 2:46 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Rep Power: 5
Solved Threads: 34
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: parse error: parse error, unexpected $ in /www

  #2  
Feb 22nd, 2007
<?php
  ob_start();
?>
<?php
$hour = date('G'); //This outputs the current hour in 0 - 23 (24 hour format)
if($hour >= 21 || $hour <= 0)
{
?>
........................webpage with flash..............................
<?php <--- You're missing this
}
else
{
?>
........................another webpage with flash.......................
<?php
  include_once "replaceObjEmbed.php";
  echo replaceObjEmbed(ob_get_clean());
?>     
Last edited by stymiee : Feb 22nd, 2007 at 3:23 am.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote  
Join Date: Nov 2006
Posts: 6
Reputation: jcisml is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
jcisml jcisml is offline Offline
Newbie Poster

Re: parse error: parse error, unexpected $ in /www

  #3  
Feb 22nd, 2007
hi!
thanks for the reply,
i've tried your suggestion but it still gives parse error
here is the file, if you could kindly please check out,
thanks
http://dalerlife.net/file.zip
Reply With Quote  
Join Date: Jan 2007
Posts: 37
Reputation: jblacdao is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 3
jblacdao jblacdao is offline Offline
Light Poster

Re: parse error: parse error, unexpected $ in /www

  #4  
Feb 22nd, 2007
Maybe your problem is not with that script but with replaceObjEmbed.php. Try checking it, maybe that's where the problem is.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 11:52 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC