BBClone absolute reference problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ethoemmes
Forum Commoner
Posts: 26
Joined: Thu Aug 18, 2005 4:11 pm

BBClone absolute reference problem

Post by ethoemmes »

I am trying to install BBClone on to my domain. I am having trouble with the absolute reference needed in index.php.

I am getting the following error when trying to execute the below code.
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /usr/local/psa/home/vhosts/rrbltd.com/httpdocs/bbclone/index.php on line 18
Does anyone know what is happening here? Code was taken directly from BBClone website.

Code: Select all

<?php
/* This file is part of BBClone (The PHP web counter on steroids)
 *
 * $Header: /cvs/bbclone/index.php,v 1.8 2005/04/03 20:26:35 olliver Exp $
 *
 * Copyright (C) 2001-2004, the BBClone Team (see file doc/authors.txt
 * distributed with this library)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * See doc/copying.txt for details
 */

 echo  "<?php\n"
      ."define("_BBCLONE_DIR", ""
      .dirname(__FILE__)."/");\n"
      ."define("COUNTER", _BBCLONE_DIR.""
      ."mark_page.php");\n"
      ."if (is_readable(COUNTER)) include_once(COUNTER);\n"
      ."?>\n"; 

// Default output.
if (is_readable("show_global.php")) include_once("show_global.php");
Thanks

JCART | Please use

Code: Select all

tags when posting php code. Review [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

the double quotes on line 18 need to be escaped...

Code: Select all

...
     ."define(\"_BBCLONE_DIR\", \""
...
?>
(strange code, why does it echo php code?)
Post Reply