Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Klasa + require_once
lDoran
post 21.12.2009, 20:44:23
Post #1





Grupa: Zarejestrowani
Postów: 172
Pomógł: 13
Dołączył: 15.11.2009

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


Nie rozumiem dlaczego skrypt się wysypuje, w folderze functions jest plik SecureString.php.

  1. <?php
  2.  
  3.  
  4. class Company
  5. {
  6. private $Company_;
  7. private $Address;
  8. private $City;
  9. private $PostCode;
  10. private $PhoneNumber;
  11. private $Email;
  12. private $NIP;
  13. private $Name;
  14. private $SurName;
  15. private $Position;
  16.  
  17. public function SetCompany($Company__, $Address_, $City_, $PostCode_, $PhoneNumber_, $Email_, $NIP_, $Name_, $SurName_, $Position_)
  18. {
  19. require_once('../functions/SecureString.php');
  20.  
  21. $this -> Company_ = FilterString($Company__);
  22. $this -> Address = FilterString($Address_);
  23. $this -> City = FilterString($City_);
  24. $this -> PostCode = FilterString($PostCode_);
  25. $this -> PhoneNumber = FilterString($PhoneNumber_);
  26. $this -> Email = FilterString($Email_);
  27. $this -> NIP = FilterString($NIP_);
  28. $this -> Name = FilterString($Name_);
  29. $this -> Surname = FilterString($SurName_);
  30. $this -> Positon = FilterString($Position_);
  31.  
  32. $this -> AddToDataBase();
  33. }
  34.  
  35. private function AddToDataBase()
  36. {
  37. require_once('../functions/db_connect.php');
  38.  
  39. $connect = db_connect();
  40.  
  41. $sql = "INSERT INTO Company ($Company_, $Address, $City, $PostCode, $NIP, $Name_, $SurName, $Position_)
  42. VALUES($this -> Company_, $this -> Address, $this -> City, $this -> PostCode, $this -> PhoneNumber,
  43. $this -> Email, $this -> NIP, $this -> Name, $this -> SurName, $this -> Position)";
  44.  
  45. $result = $connect -> query($sql);
  46.  
  47. if(!$result)
  48. echo 'Błąd! Dane nie zostały zapisane.';
  49. }
  50.  
  51. }
  52.  
  53. ?>

Kod
Warning: Company::require_once(../functions/SecureString.php) [function.Company-require-once]: failed to open stream: No such file or directory in C:\WebServ\httpd\sklep\libaries\class.Company.php on line 19

Fatal error: Company::require_once() [function.require]: Failed opening required '../functions/SecureString.php' (include_path='.;C:\php5\pear') in C:\WebServ\httpd\sklep\libaries\class.Company.php on line 19
Go to the top of the page
+Quote Post
marcio
post 21.12.2009, 21:02:02
Post #2





Grupa: Zarejestrowani
Postów: 2 291
Pomógł: 156
Dołączył: 23.09.2007
Skąd: ITALY-MILAN

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


Cytat
require_once('../functions/SecureString.php');


Pozmieniaj sciezki.

Btw: masz chyba na windzie srv wiec......smile.gif



--------------------
Zainteresowania: XML | PHP | MY(SQL)| C# for .NET | PYTHON
http://code.google.com/p/form-builider/
Moj blog
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 Wersja Lo-Fi Aktualny czas: 24.07.2025 - 17:17