Hi there,
I’m new to Serendipity and PHP but not to HTML. I have a website and have just installed Serendipity via godaddy.com. I’d like my blog to be embedded into a section of my site.
My root folder contains my index.php (it was index.htm) and the blog is in a subdir of the root called ‘blogger’.
So far I’ve created a wrapper.php file and it’s located in the root. In the file is…
<?php
ob_start();
chdir("/home/content/d/a/b/dabidaoud/html/blogger/");
require("index.php");
chdir("/home/content/d/a/b/dabidaoud/html/";
$serendipity_contents = ob_get_contents();
ob_end_clean();
?>
In my index.php the first line of code is…
<?php
require("wrapper.php"); // stores S9Y in a variable
?>
And where I want my content to load within index.php I have…
<?php
echo $serendipity_contents;
?>
I’m getting an error...
Parse error: parse error, unexpected ';' in /home/content/d/a/b/dabidaoud/html/wrapper.php on line 5.
Can you please help me out? I don’t know where I’m going wrong or right. Much appreciated.
Embedding
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Embedding
Hi!
Yes, change your wrapper.php to this:
You were missing a closing ")" 
Regards,
Garvin
Yes, change your wrapper.php to this:
Code: Select all
<?php
ob_start();
chdir("/home/content/d/a/b/dabidaoud/html/blogger/");
require("index.php");
chdir("/home/content/d/a/b/dabidaoud/html/");
$serendipity_contents = ob_get_contents();
ob_end_clean();
?> Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/