Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Thanks,
I read the guide and I found this error " [05-Nov-2010 11:16:09] PHP Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in C:\Inetpub\vhosts\thefutureshop.it\httpdocs\includes\functions\extra_functions\c lass.rlwp.php on line 23
but in that file there is no error
<?php
/**
* @package TPP
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: class.rlwp.php 511 2009-02-17 07:20:44Z hugo13 $
*
* @author rainer AT langheiter DOT com // http://www.filosofisch.com // http://edv.langheiter.com
* example: <!--%WordPress%--><!--###getWPTag###-->
* first part == name of tab ( <!--%WordPress%--> )
* second part == name of called function; param: products_id ( <!--###getWPTag###--> )
*/
define ('ABSPATH','/var/www/zc138/wordpress/'); // abs-path to wp
if (file_exists(ABSPATH.'wp-config.php')) {
require_once(ABSPATH.'wp-config.php');
$wpinstall = true;
}
class rlWP {
public $wpinstall;
private $tag;
function __construct(){
$this->wpinstall = false;
if (file_exists(ABSPATH.'wp-config.php')) {
$this->wpinstall = true;
require_once(ABSPATH.'wp-config.php');
}
}
public function getWPTag($tag = 'zen-cart'){
$content = '';
$this->tag = $tag;
if($this->wpinstall == true) {
$lastposts = get_posts('tag=' . $this->tag);
if(empty($lastposts)){
$content = 'NIX gefunden';
} else {
foreach ($lastposts as $post) {
$content .= '<div style="padding:4px; border: 1px solid green;"><h3>' . $post->post_title . '</h3><p>' . $post->post_content . '</p></div>';
}
}
} else {
$content = 'WP nicht installiert/richtig konfiguriert';
}
return $content;
}
}
function getWPTag($tag = 'zen-cart'){
$wp = new rlWP();
return $wp->getWPTag($tag);
}
I can not understand...please
What version of PHP are you using?
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
I'm using version 4.4.7
The piece of code that you're running requires PHP 5.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
thanks for your help, I am responsible for contacting the server to see if you can upgrade to version 5
Thanks
Personally, I'd recommend changing back to a Linux server too. Zen Cart is far more heavily tested on Linux, most of the people offering help here run it on Linux.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)