Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z kodem, Cannot redeclare fputcsv() in /serwis/lib/common.php on line 926
adioband
post
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 14.03.2010
Skąd: Lublin

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


  1. }#end foreach
  2. # strip the last deliminator
  3. $line = substr($line, 0, (strlen($deliminator) * -1));
  4. # add the newline
  5. $line .= "\n";
  6. # we don't care if the file pointer is invalid,
  7. # let fputs take care of it
  8. return $line;
  9. }#end fputcsv()
  10.  
  11. function fputcsv ($fp, $array, $deliminator=",") {
  12. return fputs($fp, putcsv($array,$delimitator));
  13. }#end fputcsv()
Powód edycji: [Kshyhoo]: bb-code
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 13)
Kshyhoo
post
Post #2





Grupa: Opiekunowie
Postów: 3 855
Pomógł: 317
Dołączył: 4.01.2005
Skąd: że




Jak poprawnie zadać pytanie
Jak poprawnie zatytułować wątek


--------------------
Go to the top of the page
+Quote Post
Comandeer
post
Post #3





Grupa: Zarejestrowani
Postów: 1 268
Pomógł: 254
Dołączył: 11.06.2009
Skąd: Świętochłowice

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


Trza by zmienić nazwę tej funkcji, bo PHP ma taką wbudowaną… inna rzecz, że warto użyć wbudowanej, skoro robi to samo, co Twoja


--------------------
Go to the top of the page
+Quote Post
adioband
post
Post #4





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 14.03.2010
Skąd: Lublin

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


Comandeer - czyli co z tym zrobić. Jest to fragment skryptu ktróy ma pełnić funkcję serwisu urządzeń - wprowadzenie urządeń na stan oraz monitorowanie postepów serwisu.
Go to the top of the page
+Quote Post
Turson
post
Post #5





Grupa: Zarejestrowani
Postów: 4 291
Pomógł: 829
Dołączył: 14.02.2009
Skąd: łódź

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


Zmień nazwę
Go to the top of the page
+Quote Post
adioband
post
Post #6





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 14.03.2010
Skąd: Lublin

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


  1. }#end zputcsv()
  2.  
  3. function fputcsv ($fp, $array, $deliminator=",") {
  4. return fputs($fp, putcsv($array,$delimitator));
  5. }#end zputcsv()


Zrobiłem tak i nic nie dało
Go to the top of the page
+Quote Post
nospor
post
Post #7





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Miales zmienic nazwe....

Nie: function fputcsv
a: function fputcsvalamakota


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

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





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 14.03.2010
Skąd: Lublin

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


po zmianie mam kolejny błąd

Fatal error: Cannot redeclare CSQLAdmin::$functions in /serwis/lib/sqladmin.php on line 33

  1. function UploadFile($source, $destination , $name ="") {
  2. $name = $name ? $name : basename($source);
  3. $name = FileExt($name);
  4. $name[2]= $name[0];


przepraszam nie ten kod wkleiłem

  1. var $functions;
  2.  
  3.  
  4. function CSQLAdmin($section , $templates , $db , $tables , $extra = "") {
  5. global $_CONF;
Go to the top of the page
+Quote Post
nospor
post
Post #9





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Pokaz całą klasę.


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
adioband
post
Post #10





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 14.03.2010
Skąd: Lublin

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


  1. class CSQLAdmin extends CLibrary {
  2.  
  3. /**
  4. * description
  5. *
  6. * @var type
  7. *
  8. * @access type
  9. */
  10. var $form;
  11.  
  12. /**
  13. * description
  14. *
  15. * @var type
  16. *
  17. * @access type
  18. */
  19. var $functions;
  20.  
  21.  
  22. /**
  23. * description functions list which will be executed in variouse points of sqladmin
  24. *
  25. * @var type
  26. *
  27. * @access type
  28. */
  29. var $functions;
  30.  
  31.  
  32. function CSQLAdmin($section , $templates , $db , $tables , $extra = "") {
  33. global $_CONF;
  34.  
  35. if (!$_GET["page"])
  36. $_GET["page"] = 1;
  37.  
  38.  
  39. parent::CLibrary("SQLAdmin");
  40.  
  41. //checking if the templates are orblects or path to a template file
  42. if (!is_array($templates))
  43. //if path the load the tempmate form that file
  44. $this->templates = array("generic_form" => new CTemplate($templates));
  45. else
  46. $this->templates = $templates;
  47.  
  48. $this->db = $db;
  49. $this->tables = $tables;
  50. //extra variables to be passed to cform
  51. $this->extra = $extra;
  52.  
  53. //loading the forms , changed the varialbes locations, but still keeping the compatibility
  54. $path = ($_CONF["forms"]["adminpath"] ? $_CONF["forms"]["adminpath"] : $_CONF["formspath"] );
  55. if (dirname($section)) {
  56.  
  57. $path .= dirname($section) . "/" ;
  58. $section = basename($section);
  59. }
  60.  
  61. //debuging part
  62. if (defined("PB_DEBUG") && (PB_DEBUG == "1"))
  63. echo "<br>FILE:SQLADMIN:MAIN:{$path}{$section}.xml";
  64.  
  65. $conf = new CConfig( $path . $section . ".xml");
  66.  
  67. $this->forms = $conf->vars["form"];
Go to the top of the page
+Quote Post
nospor
post
Post #11





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Masz dwa razy
var $functions;
wywal jedno


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
adioband
post
Post #12





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 14.03.2010
Skąd: Lublin

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


to teraz tek:)

CDatabase::SelectDB() error
Go to the top of the page
+Quote Post
nospor
post
Post #13





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Zlec poprostu komus naprawe tego bo widac ze nie masz o tym bladego pojecia. No nie bedziemy ci tu pokolei serwis naprawiac przez dwa tygodnie.


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
adioband
post
Post #14





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 14.03.2010
Skąd: Lublin

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


mimo wszystko dziękuje za pomoc.
Czy ktoś pomoże w tej sprawie? będę wdzięczny

Ten post edytował adioband 14.05.2015, 13:44:29
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 - 17:02