Sorry, this may be a double post, I'm not sure... Lost internet connection and first time did not show up on the board! 🙂
Any thoughts on this, can't figure it out 🙂
Parse error: syntax error, unexpected '[', expecting ',' or ';' in \rotator.php on line 11
Any help would be great; i'm kind of new at this and still trying to learn!
Thanks..
Here is lines 1 - 45...
LINE 11 is: global $GLOBALS['_POST'];
<?php
function getmicrotime( )
{
list( $usec, $sec ) = explode( " ", microtime( ) );
return ( double )$usec + ( double )$sec;
}
function deleteslashes( )
{
global $GLOBALS['_POST'];
if ( isset( $_POST ) )
{
while ( list( $key, $value ) = each( $_POST ) )
{
$GLOBALS['_POST'][$key] = str_replace( "|", "_", $_POST[$key] );
$GLOBALS['_POST'][$key] = str_replace( "*", "_", $_POST[$key] );
}
return $_POST;
}
}
function updatepack( $arr )
{
global $scriptpath;
if ( !is_array( $arr ) || count( $arr ) == 0 )
{
return false;
}
if ( file_exists( "{$scriptpath}/rotator/network/packs" ) )
{
$packs = file( "{$scriptpath}/rotator/network/packs" );
$cur_pack = isset( $packs[0] ) ? trim( $packs[0] ) : 1;
if ( !file_exists( "{$scriptpath}/rotator/network/pack{$cur_pack}" ) )
{
return false;
}
$text = join( "\n", $arr );
$text .= "\n";
$f1 = fopen( "{$scriptpath}/rotator/network/pack{$cur_pack}", "a" );
fwrite( $f1, $text );
fclose( $f1 );
@chmod( "{$scriptpath}/rotator/network/pack{$cur_pack}", 511 );
}
}
Thanks so much!