Cannot execute external php file
Posted: Thu 4. Aug 2005, 12:24
Hi!
I'm using latest version of phpwcms, but I have a little problem with {PHP:my_external_file.php} tag.
I have simple code (which found on this forum) - it get the top category ID. I need this to put this ID into flash file, which is located in header.
On my local mashine it works fine, but after uploading everything on server it gives me a warning:
When I put this code directly in [PHP] // code frome above [/PHP], there isn't any problem. However, this isn't good solution for me.
Do you have any ideas how to fix this? [/code]
I'm using latest version of phpwcms, but I have a little problem with {PHP:my_external_file.php} tag.
I have simple code (which found on this forum) - it get the top category ID. I need this to put this ID into flash file, which is located in header.
Code: Select all
$check_id = $GLOBALS['content']['cat_id'];
$struct_id = $GLOBALS['content']['struct'][$check_id]['acat_struct'];
$nav_id = $check_id;
while ($struct_id != 0) {
$nav_id = $struct_id;
$struct_id = $GLOBALS['content']['struct'][$struct_id]['acat_struct'];
}
$Number = $GLOBALS['color']['randnr'];
echo '
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="750" height="150" id="p_info'.$Number.'" align="">
<param name="movie" value="img/swf/p_info'.$Number.'.swf?p='.$nav_id.'"><param name="menu" value="false"><param name="quality" value="high"><param name="wmode" value="transparent"><param name="bgcolor" value="#FFFFFF">
<embed src="img/swf/p_info'.$Number.'.swf?p='.$nav_id.'" menu="false" quality="high" wmode="transparent" bgcolor="#FFFFFF" width="750" height="150" name="p_info'.$Number.'" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
';
Code: Select all
Warning: strpos(): Empty delimiter. in /include/inc_front/front.func.inc.php on line 1642
Do you have any ideas how to fix this? [/code]