Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP] Parse error
addas
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 18.07.2009

Ostrzeżenie: (0%)
-----


Mam problem, wchodząc do panelu admina wyświetla mi się następujący komunikat:

Kod
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/eolimpia/public_html/admin/index.php on line 68

Parse error: syntax error, unexpected $end in /home/eolimpia/public_html/admin/index.php on line 68


Plik index.php:

  1. <?php
  2. ob_start();// Bufor
  3. session_start();
  4.  
  5. // Wcms 3.0 beta bĹ&#65533;edy, sugestie, pomysĹ�y zgĹ�aszaÄ�: admin@wmaster.eu
  6.  
  7. // Pliki konfiguracyjne
  8. require '../config/config.php';
  9. require '../config/db_config.php';
  10. IF($_COOKIE['lang']) {
  11. $lang=$_COOKIE['lang'];} else {
  12. $lang=$default_lang;
  13. }
  14. define ('LANGUAGE', $lang);
  15. require '../'.LANG_DIR.'/'.LANGUAGE.'.php';
  16. require '../'.PHP_DIR.'/Sql.class.php';
  17. require '../'.PHP_DIR.'/function.php';
  18. require '../'.PHP_DIR.'/smarty/Smarty.class.php';
  19. $sprawdz=0;
  20. // Klasy
  21. $sql= new Sql;
  22.  
  23. // Smarty
  24. $tpl= new Smarty;
  25. $tpl->template_dir = TEMPLATES_DIR;// Katalog szablonĂłw
  26. $tpl->compile_dir = '../'.TEMPLATES_DIR.'_c';// Katalog tymczasowych szablonĂłw
  27. FUNCTION minia ($folder, $nazwa, $szer, $mi)
  28. {
  29. $extension=explode('.', $nazwa);
  30. $lastelement=COUNT($extension)-1;
  31. $roz=$extension[$lastelement];
  32. IF(substr($nazwa, -4, 4) == '.jpg' || substr($nazwa, -4, 4) == 'jpeg' || substr($nazwa, -4, 4) == 'JPEG' || substr($nazwa, -4, 4) == '.JPG')
  33. {
  34. $org = imagecreatefromjpeg(''.$folder.''.$nazwa.'');
  35. }
  36. elseif(substr($nazwa, -4, 4) == '.gif')
  37. {
  38. $org = imagecreatefromgif(''.$folder.''.$nazwa.'');
  39. }
  40. $s_org = imagesx($org);
  41. $w_org = imagesy($org);
  42.  
  43. $wys = floor(($szer * $w_org) / $s_org);
  44. $min = imagecreatetruecolor($szer, $wys);
  45. ImageCopyResampled ($min, $org, 0, 0, 0, 0, $szer, $wys, $s_org, $w_org);
  46. imagedestroy($org);
  47.  
  48.  
  49. IF(substr($nazwa, -4, 4) == '.jpg' || substr($nazwa, -4, 4) == 'jpeg' || substr($nazwa, -4, 4) == 'JPEG' || substr($nazwa, -4, 4) == '.JPG')
  50. {
  51. imagejpeg($min, ''.$folder.$mi.$nazwa.'', 100);
  52. }
  53. elseif(substr($nazwa, -4, 4) == '.gif' || substr($nazwa, -4, 4) == '.GIF')
  54. {
  55. imagegif($min, ''.$folder.$mi.$nazwa.'');
  56. }
  57. imagedestroy($min);
  58. }
  59.  
  60. IF ($_SESSION['admin']) {
  61. //Header
  62. require 'php/header.php';
  63.  
  64. // TreĹ&#65533;Ä� strony
  65. require 'php/tresc.php';
  66.  
  67. // Stopka strony
  68. require 'php/foter.php';
  69. ?>


W czym kryje się błąd? Z góry dzięki za wszelkie podpowiedzi winksmiley.jpg

Ten post edytował addas 18.07.2009, 17:03:39
Go to the top of the page
+Quote Post
kielich
post
Post #2





Grupa: Zarejestrowani
Postów: 442
Pomógł: 4
Dołączył: 28.12.2008
Skąd: Warszawa

Ostrzeżenie: (20%)
X----


  1. <?php
  2. if ($_SESSION['admin']) {
  3. //Header
  4. require 'php/header.php';
  5.  
  6. // Tre�� strony
  7. require 'php/tresc.php';
  8.  
  9. // Stopka strony
  10. require 'php/foter.php';
  11. ?>


nie zamknołeś nawiasu


--------------------
Życie jest jak SESJA kiedyś wygaśnie ....

Jeśli moja odpowiedź jakoś Cię nakierowała lub pomogła kliknij Pomógł
Go to the top of the page
+Quote Post
addas
post
Post #3





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 18.07.2009

Ostrzeżenie: (0%)
-----


Po ze edytowaniu nadal wyświetla się ten sam błąd sad.gif
Go to the top of the page
+Quote Post
Spawnm
post
Post #4





Grupa: Moderatorzy
Postów: 4 069
Pomógł: 497
Dołączył: 11.05.2007
Skąd: Warszawa




Używaj poprawnego bbcode exclamation.gif!

Nadal nie działa? Ale wiesz że masz błędy w składni , przeszukaj kod i je popraw .
Go to the top of the page
+Quote Post
addas
post
Post #5





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 18.07.2009

Ostrzeżenie: (0%)
-----


Muszę przyznać, że jestem "zielony" jeśli chodzi o php i nie mam pojęcia co poprawić, jeśli byłby ktoś tak miły i poprawił to co jest źle z chęcią dam "pomógł" winksmiley.jpg
Go to the top of the page
+Quote Post
Wicepsik
post
Post #6





Grupa: Zarejestrowani
Postów: 1 575
Pomógł: 299
Dołączył: 26.03.2009

Ostrzeżenie: (20%)
X----


Podaj treść błędu?


--------------------
Go to the top of the page
+Quote Post
ayeo
post
Post #7





Grupa: Przyjaciele php.pl
Postów: 1 202
Pomógł: 117
Dołączył: 13.04.2007
Skąd: 127.0.0.1

Ostrzeżenie: (0%)
-----


Witam!

Wygląda na to, że nie chcesz się niczego nauczyć, szukasz jedynie gotowca. Za sugestią @Spawnm, przenoszę do działu poszukuję. W związku z tym zmieniam tytuł tematu.

Pozdrawiam!


--------------------
Go to the top of the page
+Quote Post
fander
post
Post #8





Grupa: Zarejestrowani
Postów: 231
Pomógł: 22
Dołączył: 6.10.2008

Ostrzeżenie: (0%)
-----


Kod
<?php
ob_start();// Bufor
session_start();

// Wcms 3.0 beta b�edy, sugestie, pomys�y zg�asza�: admin@wmaster.eu

// Pliki konfiguracyjne
require '../config/config.php';
require '../config/db_config.php';
if($_COOKIE['lang']) {
    $lang=$_COOKIE['lang'];} else {
    $lang=$default_lang;
}
define ('LANGUAGE', $lang);
require '../'.LANG_DIR.'/'.LANGUAGE.'.php';
require '../'.PHP_DIR.'/Sql.class.php';
require '../'.PHP_DIR.'/function.php';
require '../'.PHP_DIR.'/smarty/Smarty.class.php';
$sprawdz=0;
// Klasy
$sql= new Sql;

// Smarty
$tpl= new Smarty;
$tpl->template_dir = TEMPLATES_DIR;// Katalog szablonĂłw
$tpl->compile_dir = '../'.TEMPLATES_DIR.'_c';// Katalog tymczasowych szablonĂłw
function minia ($folder, $nazwa, $szer, $mi)
{
    $extension=explode('.', $nazwa);
    $lastelement=COUNT($extension)-1;
    $roz=$extension[$lastelement];
    if(substr($nazwa, -4, 4) == '.jpg' || substr($nazwa, -4, 4) == 'jpeg' || substr($nazwa, -4, 4) == 'JPEG' || substr($nazwa, -4, 4) == '.JPG')
    {
        $org = imagecreatefromjpeg(''.$folder.''.$nazwa.'');
    }
    elseif(substr($nazwa, -4, 4) == '.gif')
    {
        $org = imagecreatefromgif(''.$folder.''.$nazwa.'');
    }
    $s_org = imagesx($org);
    $w_org = imagesy($org);

    $wys = floor(($szer * $w_org) / $s_org);
    $min = imagecreatetruecolor($szer, $wys);
    ImageCopyResampled ($min, $org, 0, 0, 0, 0, $szer, $wys, $s_org, $w_org);
    imagedestroy($org);


    if(substr($nazwa, -4, 4) == '.jpg' || substr($nazwa, -4, 4) == 'jpeg' || substr($nazwa, -4, 4) == 'JPEG' || substr($nazwa, -4, 4) == '.JPG')
    {
        imagejpeg($min, ''.$folder.$mi.$nazwa.'', 100);
    }
    elseif(substr($nazwa, -4, 4) == '.gif' || substr($nazwa, -4, 4) == '.GIF')
    {
        imagegif($min, ''.$folder.$mi.$nazwa.'');
    }
    imagedestroy($min);
}

if ($_SESSION['admin']) {
    //Header
    require 'php/header.php';

    // TreĹ�Ä� strony
    require 'php/tresc.php';

    // Stopka strony
    require 'php/foter.php';
}
?>
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 09:50