Parse error: syntax error, unexpected
bipooh - 29/03/2008 23:23 (laatste wijziging 29/03/2008 23:30)
Nieuw lid
Hallo, ik krijg steeds deze foutmelding:
Parse error: syntax error, unexpected ';' in /storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/config.php on line 56
<?php
## Config file ##
ob_start( );
session_start( );
## Hier gaan we de site bepalingen doen. Dus babes of hunks. ##
## Licentie :: 1 ##
## Copyright, incl doorverkoops rechten! ##
## Instellingen en opties configureren en daarna volledig verwerken ##
$__GETADRES = getenv( 'HTTP_HOST' );
$Site = array( );
if( eregi( '************', $__GETADRES ) ) {
## site instellingen ##
$Site[ 'style' ] = 'styles/style_hu.css';
## Base url ##
$Site[ 'base_url' ] = 'http://www.************.nl';
## Site titel ##
$Site[ 'titel' ] = '';
## Thema map in de map images ##/
$Site[ 'theme_map'] = '************';
}
elseif( eregi( '************', $__GETADRES ) ) {
## site instellingen ##
$Site[ 'style' ] = 'styles/style_ba.css';
## Base url ##
$Site[ 'base_url' ] = 'http://www.************.nl';
## Site titel ##
$Site[ 'titel' ] = '';
## Thema map in de map images ##/
$Site[ 'theme_map'] = '************';
}
else{
}
$config = array( );
$config['db']['user'] = '************'; //Gebruikersnaam van datebase
$config['db']['pass'] = '************'; //Wachtwoord van datebase
$config['db']['host'] = '************'; //Plaats waar datebase staat 99% altijd localhost
$config['db']['base'] = '**************'; //Datebasenaam
## Database connection ##
$db['connect'] = mysql_connect( $config['db']['host'], $config['db']['user'], $config['db']['pass'] );
if( mysql_select_db( $config['db']['base'], $db['connect'] ) == false ) {
print $lang['db']['error'];
exit( );
}
(
define( 'pad', '/storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/', true ); //Website path
define( 'url', $Site[ 'base_url' ], true ); //Website adres
require pad . 'include/functions.php',"r";
$_SESSION['ip'] = client_ip( );
require pad . 'include/ubb.php,"r"';
require pad . 'include/online.class.php,"r"';
if( ingelogd( ) ) {
$Query = mysql_query( "SELECT * FROM leden WHERE Id = '" . $_SESSION['id'] . "' " );
$user = mysql_fetch_assoc( $Query );
setcookie( '2609198787190926', $_SESSION['username'] . '(24124546512154)' . $_SESSION['id'], time( ) + ( 60 * 60 * 24 * 365 ) );
}
else{
$user = array( );
if( isset( $_COOKIE['2609198787190926'] ) ) {
$EX = explode( '(24124546512154)', $_COOKIE['2609198787190926'] );
$_SESSION['username'] = $EX[0];
$_SESSION['id'] = $EX[1];
header( 'Location: ' . $_SERVER['PHP_SELF'] );
}
}
?>
<?php
## Config file ##
## Hier gaan we de site bepalingen doen. Dus babes of hunks. ##
## Licentie :: 1 ##
## Copyright, incl doorverkoops rechten! ##
## Instellingen en opties configureren en daarna volledig verwerken ##
$__GETADRES = getenv ( 'HTTP_HOST' ) ;
if ( eregi ( '************' , $__GETADRES ) ) { ## site instellingen ##
$Site [ 'style' ] = 'styles/style_hu.css' ;
## Base url ##
$Site [ 'base_url' ] = 'http://www.************.nl' ;
## Site titel ##
$Site [ 'titel' ] = '' ;
## Thema map in de map images ##/
$Site [ 'theme_map' ] = '************' ;
}
elseif ( eregi ( '************' , $__GETADRES ) ) { ## site instellingen ##
$Site [ 'style' ] = 'styles/style_ba.css' ;
## Base url ##
$Site [ 'base_url' ] = 'http://www.************.nl' ;
## Site titel ##
$Site [ 'titel' ] = '' ;
## Thema map in de map images ##/
$Site [ 'theme_map' ] = '************' ;
}
else {
}
$config [ 'db' ] [ 'user' ] = '************' ; //Gebruikersnaam van datebase
$config [ 'db' ] [ 'pass' ] = '************' ; //Wachtwoord van datebase
$config [ 'db' ] [ 'host' ] = '************' ; //Plaats waar datebase staat 99% altijd localhost
$config [ 'db' ] [ 'base' ] = '**************' ; //Datebasenaam
## Database connection ##
$db [ 'connect' ] = mysql_connect ( $config [ 'db' ] [ 'host' ] , $config [ 'db' ] [ 'user' ] , $config [ 'db' ] [ 'pass' ] ) ; print $lang [ 'db' ] [ 'error' ] ; }
(
define ( 'pad' , '/storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/' , true ) ; //Website path define ( 'url' , $Site [ 'base_url' ] , true ) ; //Website adres
require pad . 'include/functions.php' , "r" ;
$_SESSION [ 'ip' ] = client_ip( ) ;
require pad . 'include/ubb.php,"r"' ;
require pad . 'include/online.class.php,"r"' ;
if ( ingelogd( ) ) {
$Query = mysql_query ( "SELECT * FROM leden WHERE Id = '" . $_SESSION [ 'id' ] . "' " ) ;
setcookie ( '2609198787190926' , $_SESSION [ 'username' ] . '(24124546512154)' . $_SESSION [ 'id' ] , time ( ) + ( 60 * 60 * 24 * 365 ) ) ; }
else {
if ( isset ( $_COOKIE [ '2609198787190926' ] ) ) { $EX = explode ( '(24124546512154)' , $_COOKIE [ '2609198787190926' ] ) ; $_SESSION [ 'username' ] = $EX [ 0 ] ;
$_SESSION [ 'id' ] = $EX [ 1 ] ;
header ( 'Location: ' . $_SERVER [ 'PHP_SELF' ] ) ; }
}
?>
kan iemand me helpen?
15 antwoorden
Gesponsorde links
vinTage - 29/03/2008 23:31
Nieuw lid
regel 55, wat doet dat haakje daar ?
Ibrahim - 29/03/2008 23:31
PHP expert
regel 50-55:
if( ... ) {
// code
}
{
}
kan niet he ?
Ibrahim - 29/03/2008 23:48
PHP expert
voortaan bij bewerking van je script gewoon een nieuwe reactie aanmaken, niet een topic.
bipooh - 29/03/2008 23:56
Nieuw lid
help me es please verander voor me dat ie werkt
vinTage - 30/03/2008 00:00
Nieuw lid
require pad . 'include/functions.php', "r";
moet
require pad . 'include/functions.php, "r"';
worden denk ik.
bipooh - 30/03/2008 00:08 (laatste wijziging 30/03/2008 00:13)
Nieuw lid
ik heb het ook geprobeerd maarlukt ook niet
ik heb dit nu en krijg een ander melding:
<?php
## Config file ##
ob_start( );
session_start( );
## Hier gaan we de site bepalingen doen. Dus babes of hunks. ##
## Licentie :: 1 ##
## Copyright, incl doorverkoops rechten! ##
## Instellingen en opties configureren en daarna volledig verwerken ##
$__GETADRES = getenv( 'HTTP_HOST' );
$Site = array( );
if( eregi( 'sgfhghghks', $__GETADRES ) ) {
## site instellingen ##
$Site[ 'style' ] = 'styles/style_hu.css';
## Base url ##
$Site[ 'base_url' ] = 'http://www.sfhgfhghs.nl';
## Site titel ##
$Site[ 'titel' ] = '';
## Thema map in de map images ##/
$Site[ 'theme_map'] = 'sufghgfhgfh';
}
elseif( eregi( 'sughgfhghghgfhes', $__GETADRES ) ) {
## site instellingen ##
$Site[ 'style' ] = 'styles/style_ba.css';
## Base url ##
$Site[ 'base_url' ] = 'http://www.fhgfhghes.nl';
## Site titel ##
$Site[ 'titel' ] = '';
## Thema map in de map images ##/
$Site[ 'theme_map'] = 'sufghgfhges';
}
else{
}
$config = array( );
$config['db']['user'] = 'mfdhgfhgfhgfgh2'; //Gebruikersnaam van datebase
$config['db']['pass'] = '7dfhgfhggNK'; //Wachtwoord van datebase
$config['db']['host'] = 'db.rghgfhgs.nl'; //Plaats waar datebase staat 99% altijd localhost
$config['db']['base'] = 'mdgfhgfhgfhgh2'; //Datebasenaam
## Database connection ##
$db['connect'] = mysql_connect( $config['db']['host'], $config['db']['user'], $config['db']['pass'] );
if( mysql_select_db( $config['db']['base'], $db['connect'] ) == false ) {
print $lang['db']['error'];
exit( );
define( 'pad', '/storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/config.php', true ); //Website path
define( 'url', $Site[ 'base_url' ], true ); //Website adres
require pad . 'include/functions.php, "r"';
$_SESSION['ip'] = client_ip( );
require pad . 'include/ubb.php,"r"';
require pad . 'include/online.class.php,"r"';
if( ingelogd( ) ) {
$Query = mysql_query( "SELECT * FROM leden WHERE Id = '" . $_SESSION['id'] . "' " );
$user = mysql_fetch_assoc( $Query );
setcookie( '2609198787190926', $_SESSION['username'] . '(24124546512154)' . $_SESSION['id'], time( ) + ( 60 * 60 * 24 * 365 ) );
}
else{
$user = array( );
if( isset( $_COOKIE['2609198787190926'] ) ) {
$EX = explode( '(24124546512154)', $_COOKIE['2609198787190926'] );
$_SESSION['username'] = $EX[0];
$_SESSION['id'] = $EX[1];
header( 'Location: ' . $_SERVER['PHP_SELF'] );
}
}
?>
<?php
## Config file ##
## Hier gaan we de site bepalingen doen. Dus babes of hunks. ##
## Licentie :: 1 ##
## Copyright, incl doorverkoops rechten! ##
## Instellingen en opties configureren en daarna volledig verwerken ##
$__GETADRES = getenv ( 'HTTP_HOST' ) ;
if ( eregi ( 'sgfhghghks' , $__GETADRES ) ) { ## site instellingen ##
$Site [ 'style' ] = 'styles/style_hu.css' ;
## Base url ##
$Site [ 'base_url' ] = 'http://www.sfhgfhghs.nl' ;
## Site titel ##
$Site [ 'titel' ] = '' ;
## Thema map in de map images ##/
$Site [ 'theme_map' ] = 'sufghgfhgfh' ;
}
elseif ( eregi ( 'sughgfhghghgfhes' , $__GETADRES ) ) { ## site instellingen ##
$Site [ 'style' ] = 'styles/style_ba.css' ;
## Base url ##
$Site [ 'base_url' ] = 'http://www.fhgfhghes.nl' ;
## Site titel ##
$Site [ 'titel' ] = '' ;
## Thema map in de map images ##/
$Site [ 'theme_map' ] = 'sufghgfhges' ;
}
else {
}
$config [ 'db' ] [ 'user' ] = 'mfdhgfhgfhgfgh2' ; //Gebruikersnaam van datebase
$config [ 'db' ] [ 'pass' ] = '7dfhgfhggNK' ; //Wachtwoord van datebase
$config [ 'db' ] [ 'host' ] = 'db.rghgfhgs.nl' ; //Plaats waar datebase staat 99% altijd localhost
$config [ 'db' ] [ 'base' ] = 'mdgfhgfhgfhgh2' ; //Datebasenaam
## Database connection ##
$db [ 'connect' ] = mysql_connect ( $config [ 'db' ] [ 'host' ] , $config [ 'db' ] [ 'user' ] , $config [ 'db' ] [ 'pass' ] ) ; print $lang [ 'db' ] [ 'error' ] ;
define ( 'pad' , '/storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/config.php' , true ) ; //Website path define ( 'url' , $Site [ 'base_url' ] , true ) ; //Website adres
require pad . 'include/functions.php, "r"' ;
$_SESSION [ 'ip' ] = client_ip( ) ;
require pad . 'include/ubb.php,"r"' ;
require pad . 'include/online.class.php,"r"' ;
if ( ingelogd( ) ) {
$Query = mysql_query ( "SELECT * FROM leden WHERE Id = '" . $_SESSION [ 'id' ] . "' " ) ;
setcookie ( '2609198787190926' , $_SESSION [ 'username' ] . '(24124546512154)' . $_SESSION [ 'id' ] , time ( ) + ( 60 * 60 * 24 * 365 ) ) ; }
else {
if ( isset ( $_COOKIE [ '2609198787190926' ] ) ) { $EX = explode ( '(24124546512154)' , $_COOKIE [ '2609198787190926' ] ) ; $_SESSION [ 'username' ] = $EX [ 0 ] ;
$_SESSION [ 'id' ] = $EX [ 1 ] ;
header ( 'Location: ' . $_SERVER [ 'PHP_SELF' ] ) ; }
}
?>
Parse error: syntax error, unexpected $end in /storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/config.php on line 78
vinTage - 30/03/2008 00:08 (laatste wijziging 30/03/2008 00:11)
Nieuw lid
Welke error geeft hij dan ?
Ik bedoel dus zonder dat haakje en die ene regel aangepast
edit: zo dus:
<?php
//# Config file ##
ob_start();
session_start();
//# Hier gaan we de site bepalingen doen. Dus babes of hunks. ##
//# Licentie :: 1 ##
//# Copyright, incl doorverkoops rechten! ##
//# Instellingen en opties configureren en daarna volledig verwerken ##
$__GETADRES = getenv('HTTP_HOST');
$Site = array();
if (eregi('************', $__GETADRES))
{
//# site instellingen ##
$Site['style'] = 'styles/style_hu.css';
//# Base url ##
$Site['base_url'] = 'http://www.************.nl';
//# Site titel ##
$Site['titel'] = '';
//# Thema map in de map images ##/
$Site['theme_map'] = '************';
}
elseif (eregi('************', $__GETADRES))
{
//# site instellingen ##
$Site['style'] = 'styles/style_ba.css';
//# Base url ##
$Site['base_url'] = 'http://www.************.nl';
//# Site titel ##
$Site['titel'] = '';
//# Thema map in de map images ##/
$Site['theme_map'] = '************';
}
else
{
//jawadde ?
}
$config = array();
//Gebruikersnaam van datebase
$config['db']['user'] = '************';
//Wachtwoord van datebase
$config['db']['pass'] = '************';
//Plaats waar datebase staat 99% altijd localhost
$config['db']['host'] = '************';
//Datebasenaam
$config['db']['base'] = '**************';
//# Database connection ##
$db['connect'] = mysql_connect($config['db']['host'], $config['db']['user'], $config['db']['pass']);
if (mysql_select_db($config['db']['base'], $db['connect']) == false)
{
print $lang['db']['error'];
exit();
}
//Website path
define('pad', '/storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/', true);
//Website adres
define('url', $Site['base_url'], true);
require pad . 'include/functions.php,"r"';
$_SESSION['ip'] = client_ip();
require pad . 'include/ubb.php,"r"';
require pad . 'include/online.class.php,"r"';
if (ingelogd())
{
$Query = mysql_query("SELECT * FROM leden WHERE Id = '" . $_SESSION['id'] . "' ");
$user = mysql_fetch_assoc($Query);
setcookie('2609198787190926', $_SESSION['username'] . '(24124546512154)' . $_SESSION['id'], time() + (60 * 60 * 24 * 365));
}
else
{
$user = array();
if (isset($_COOKIE['2609198787190926']))
{
$EX = explode('(24124546512154)', $_COOKIE['2609198787190926']);
$_SESSION['username'] = $EX[0];
$_SESSION['id'] = $EX[1];
header('Location: ' . $_SERVER['PHP_SELF']);
}
}
?>
<?php
//# Config file ##
//# Hier gaan we de site bepalingen doen. Dus babes of hunks. ##
//# Licentie :: 1 ##
//# Copyright, incl doorverkoops rechten! ##
//# Instellingen en opties configureren en daarna volledig verwerken ##
$__GETADRES = getenv ( 'HTTP_HOST' ) ;
if ( eregi ( '************' , $__GETADRES ) ) {
//# site instellingen ##
$Site [ 'style' ] = 'styles/style_hu.css' ;
//# Base url ##
$Site [ 'base_url' ] = 'http://www.************.nl' ;
//# Site titel ##
$Site [ 'titel' ] = '' ;
//# Thema map in de map images ##/
$Site [ 'theme_map' ] = '************' ;
}
elseif ( eregi ( '************' , $__GETADRES ) ) {
//# site instellingen ##
$Site [ 'style' ] = 'styles/style_ba.css' ;
//# Base url ##
$Site [ 'base_url' ] = 'http://www.************.nl' ;
//# Site titel ##
$Site [ 'titel' ] = '' ;
//# Thema map in de map images ##/
$Site [ 'theme_map' ] = '************' ;
}
else
{
//jawadde ?
}
//Gebruikersnaam van datebase
$config [ 'db' ] [ 'user' ] = '************' ;
//Wachtwoord van datebase
$config [ 'db' ] [ 'pass' ] = '************' ;
//Plaats waar datebase staat 99% altijd localhost
$config [ 'db' ] [ 'host' ] = '************' ;
//Datebasenaam
$config [ 'db' ] [ 'base' ] = '**************' ;
//# Database connection ##
$db [ 'connect' ] = mysql_connect ( $config [ 'db' ] [ 'host' ] , $config [ 'db' ] [ 'user' ] , $config [ 'db' ] [ 'pass' ] ) ; {
print $lang [ 'db' ] [ 'error' ] ; }
//Website path
define ( 'pad' , '/storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/' , true ) ; //Website adres
define ( 'url' , $Site [ 'base_url' ] , true ) ;
require pad . 'include/functions.php,"r"' ;
$_SESSION [ 'ip' ] = client_ip( ) ;
require pad . 'include/ubb.php,"r"' ;
require pad . 'include/online.class.php,"r"' ;
if ( ingelogd( ) )
{
$Query = mysql_query ( "SELECT * FROM leden WHERE Id = '" . $_SESSION [ 'id' ] . "' " ) ;
setcookie ( '2609198787190926' , $_SESSION [ 'username' ] . '(24124546512154)' . $_SESSION [ 'id' ] , time ( ) + ( 60 * 60 * 24 * 365 ) ) ; }
else
{
if ( isset ( $_COOKIE [ '2609198787190926' ] ) ) {
$EX = explode ( '(24124546512154)' , $_COOKIE [ '2609198787190926' ] ) ; $_SESSION [ 'username' ] = $EX [ 0 ] ;
$_SESSION [ 'id' ] = $EX [ 1 ] ;
header ( 'Location: ' . $_SERVER [ 'PHP_SELF' ] ) ; }
}
?>
bipooh - 30/03/2008 00:17
Nieuw lid
wat heb je nou gedaan:p
vinTage - 30/03/2008 00:23
Nieuw lid
De code gefixed, dus haakje weg en die quote verzet (en je code netter gemaakt dmv codebeatifier)
bipooh - 30/03/2008 00:27 (laatste wijziging 30/03/2008 00:34)
Nieuw lid
thnx ff probere:D
oeps ik heb het geprobeerd maar krijg 3 andere meldingen..?
Citaat:
Warning: require() [function.require]: Unable to access /storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/include/functions.php,"r" in /storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/config.php on line 68
Warning: require(/storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/include/functions.php,"r") [function.require]: failed to open stream: No such file or directory in /storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/config.php on line 68
Fatal error: require() [function.require]: Failed opening required '/storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/include/functions.php,"r"' (include_path='.:/usr/share/php:/usr/share/pear') in /storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/config.php on line 68
vinTage - 30/03/2008 00:38
Nieuw lid
ditte ingevuld ?
$Site[ 'base_url' ] = 'http://www.************.nl'
bipooh - 30/03/2008 00:47
Nieuw lid
ik heb et weggehaad en zie nu dat ik nog een melding heb,,
Parse error: syntax error, unexpected T_ELSE in /storage/mijndomein/users/109553/public/sites/www.realmocros.nl/include/config.php on line 79
Gesponsorde links
Dit onderwerp is gesloten .