I got a directory installed within xytheme.com. I want to call the stats and put it on my main blog. As you can see from www.xytheme.com, there is a sidebar there and I want to put my directory stats on it.
This theme is not a widget ready so everything has to be coded. I don't really good in coding, a simple task is ok though.
If your file is located in a different directory try something like this if it's within your current working directory:
PHP Code:
<?php include('/dir/stats_main.php'); ?>
If it's above your current working directory use something like this (../ takes you back a directory, you can use this multiple times to go back multiple directories)
PHP Code:
<?php include('../../stats_main.php'); ?>
That is provided that your file is 2 directories back.
Finally you could try something like this if the file is a directory (or more) back but in another directory:
Will start at the beginning of the filesystem. To get to a directory above the current working directory you'd just have 'dir/stats_main.php' or './dir/stats_main.php'.
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/xytheme/public_html/wp-content/themes/mytheme/header.php:5) in /home/xytheme/public_html/directory/stats_main.php on line 8
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/xytheme/public_html/wp-content/themes/mytheme/header.php:5) in /home/xytheme/public_html/directory/stats_main.php on line 8
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/xytheme/public_html/config.php on line 4
Parse error: syntax error, unexpected '<' in /home/xytheme/public_html/config.php on line 4
It's getting the file fine, but there's a few problems with the code in stats_main.php and config.php. In the stats file, you have it starting a session. Sessions can only be started before any output is sent to the browser. To fix that problem, take session_start() from stats_main.php and put it at the beginning of your main file. You also have some parse errors in your config.php file. Parse errors are generally minor problems with how your code is structured.
I can't really see how your files are setup so this makes it a little more difficult to attack the problem unfortunately. What errors are you still receiving? (I mean have you made any changes since last post?)