Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Fatal error: function name must be a string
.radex
post
Post #1





Grupa: Zarejestrowani
Postów: 1 657
Pomógł: 125
Dołączył: 29.04.2006

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


fragment kodu:

  1. <?php
  2. function comm_del(){
  3. $this->load->model('Comments');
  4. $nid = $this->uri->segment(3);
  5. $id = $this->uri->segment(4);
  6. if(isset($id) and is_numeric($id) and $this->login->is_admin_r()){
  7. $this->Comments->delete_comment($id);
  8. }
  9. echo '<META HTTP-EQUIV="Refresh" CONTENT="1; URL='.$site_url('news/read_more/'.$nid).'">'; //42 linia
  10. }
  11. ?>


wywala:

Cytat
Fatal error: Function name must be a string in D:\Moje Dokumenty\Radex\Server\wtrmln3\wtrmln\Site1\controllers\news.php on line 42


komentarz:

funkcja jest częścią klasy, charakterystycznie dla frameworka Code Igniter.


--------------------
blog | Tadam — minutnik do Pomodoro na Maka :)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
vip3r
post
Post #2





Grupa: Zarejestrowani
Postów: 162
Pomógł: 0
Dołączył: 28.11.2006
Skąd: 2322

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


hmm. sproboj tak
  1. <?php
  2. echo '<META HTTP-EQUIV="Refresh" CONTENT="1;URL='.$site_url('news/read_more/'.$nid).'">';
  3. ?>
Go to the top of the page
+Quote Post
.radex
post
Post #3





Grupa: Zarejestrowani
Postów: 1 657
Pomógł: 125
Dołączył: 29.04.2006

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


czy mi się zdaję, czy właśnie przepisałeś to co ja napisałem biggrin.gif?

Sorka wielkie. Naprawde dziś nie myślę. Przypadkiem przed nazwą funkcji dałem "$".

Zamknąć temat!!!!


--------------------
blog | Tadam — minutnik do Pomodoro na Maka :)
Go to the top of the page
+Quote Post
vip3r
post
Post #4





Grupa: Zarejestrowani
Postów: 162
Pomógł: 0
Dołączył: 28.11.2006
Skąd: 2322

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


nie przepisalem, zalwazylem rowniez kropke nie potrzebna a to tez nie zalwazylem :/
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: 19.08.2025 - 19:39