By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,118 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,118 IT Pros & Developers. It's quick & easy.

Complete Amature

P: 1
Hey guys, I have a problem with a php page Im trying to encode. The error im reciving is:
Parse error: parse error, unexpected ':' in /home/content/l/d/b/ldbrauer/html/selectbf/include/jpcache/jpcache.php on line 40
The code is as follows:

[PHP]<?php

$JPCACHE_VERSION="v2";

/*
jpcache
Copyright 2001 - 2003 Jean-Pierre Deckers <jp@jpcache.com>

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.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

/*
Credits:

Based upon and inspired by:
phpCache <nathan@0x00.org> (http://www.0x00.org/phpCache)
gzdoc.php <catoc@163.net> and <jlim@natsoft.com.my>
jr-cache.php <jr-jrcache@quo.to>

More info on http://www.jpcache.com/

*/

// Set the includedir to the jpcache-directory
$includedir = "<c:/program files/selectbf/php/include/jpcache/jpcache.php>";

// Configuration file
require "$includedir = "<c:/program files/selectbf/php/include/jpcache/jpcache-config.php>";

// Standard functions
require "$includedir = "<c:/program files/selectbf/php/include/jpcache/jpcache-main.php>";

// Type specific implementations
require "$includedir = "<c:/program files/selectbf/php/include/jpcache/type/$JPCACHE_TYPE.php>";

// Start caching
jpcache_start();
?>[/PHP]

Any help is greatly apperciated!
Dec 29 '07 #1
Share this Question
Share on Google+
1 Reply


Markus
Expert 5K+
P: 6,050
Hey guys, I have a problem with a php page Im trying to encode. The error im reciving is:


The code is as follows:

[PHP]<?php

$JPCACHE_VERSION="v2";

/*
jpcache
Copyright 2001 - 2003 Jean-Pierre Deckers <jp@jpcache.com>

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.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

/*
Credits:

Based upon and inspired by:
phpCache <nathan@0x00.org> (http://www.0x00.org/phpCache)
gzdoc.php <catoc@163.net> and <jlim@natsoft.com.my>
jr-cache.php <jr-jrcache@quo.to>

More info on http://www.jpcache.com/

*/

// Set the includedir to the jpcache-directory
$includedir = "<c:/program files/selectbf/php/include/jpcache/jpcache.php>";

// Configuration file
require "$includedir = "<c:/program files/selectbf/php/include/jpcache/jpcache-config.php>";

// Standard functions
require "$includedir = "<c:/program files/selectbf/php/include/jpcache/jpcache-main.php>";

// Type specific implementations
require "$includedir = "<c:/program files/selectbf/php/include/jpcache/type/$JPCACHE_TYPE.php>";

// Start caching
jpcache_start();
?>[/PHP]

Any help is greatly apperciated!
See on line 40 - you close the double quote. This, in essence is what you want, but in practice it's actually closing the first double quote.

You've already assigned the directory URL to a variable, so there's no need to state it again:
[php]
// Set the includedir to the jpcache-directory
$includedir = "<c:/program files/selectbf/php/include/jpcache/jpcache.php>";

// Configuration file
require($includedir);
[/php]
Will suffice :)
Dec 29 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.