Thread: StatsLab13
View Single Post
Old 12-16-2012, 11:31 PM   #16
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Code:
<?php
include("/home/pcjbl/pcjbl.com/StatsLab/widget.php?show=standings&division=1&sub_league=1");
?>
That's the type of coding I should use for the widgets right? For the life of me it's not working in my sidebars and I've been at it for awhile trying a number of different PHP Text widgets in Wordpress...

Getting this error.

Warning: include(/home/pcjbl/pcjbl.com/StatsLab/widget.php?show=standings&division=1&sub_league=1) [function.include]: failed to open stream: No such file or directory in /home/pcjbl/pcjbl.com/wp-content/plugins/enhanced-text-widget/enhanced-text-widget.php(53) : eval()'d code on line 2

Warning: include() [function.include]: Failed opening '/home/pcjbl/pcjbl.com/StatsLab/widget.php?show=standings&division=1&sub_league=1' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/pcjbl/pcjbl.com/wp-content/plugins/enhanced-text-widget/enhanced-text-widget.php(53) : eval()'d code on line 2


I tried to switch it a bit with this...

Code:
<?php
include $_SERVER['document_root'].’/StatsLab/widget.php?show=leaders’;
?>
Parse error: syntax error, unexpected '=' in /home/pcjbl/pcjbl.com/test.php on line 2

Right now I'm just trying to call the code to a php file to see if I can get it to work. I can get the links themselves to work perfectly fine, but once I put the parameter everything seems to break down... The sad part is I know it's just a simple fix, I'm just not thinking straight.

It appears you can't sent parameters via include with local php files, the only way to do that is with external links (which is a big security no no).

I can get the include to work with if I just include widget.php I get the same output on my Wordpress install as I do when I go to the direct link, but that doesn't provide anything useful.
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!

Last edited by dangarion; 12-17-2012 at 02:04 AM.
dangarion is offline   Reply With Quote