Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Problem z kodem
Forum PHP.pl > Forum > Przedszkole
adioband
  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()
Comandeer
Trza by zmienić nazwę tej funkcji, bo PHP ma taką wbudowaną… inna rzecz, że warto użyć wbudowanej, skoro robi to samo, co Twoja
adioband
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.
Turson
Zmień nazwę
adioband
  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
nospor
Miales zmienic nazwe....

Nie: function fputcsv
a: function fputcsvalamakota
adioband
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;
nospor
Pokaz całą klasę.
adioband
  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"];
nospor
Masz dwa razy
var $functions;
wywal jedno
adioband
to teraz tek:)

CDatabase::SelectDB() error
nospor
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.
adioband
mimo wszystko dziękuje za pomoc.
Czy ktoś pomoże w tej sprawie? będę wdzięczny
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.