Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Pomieszanie z katalogami
daniel1302
post
Post #1





Grupa: Zarejestrowani
Postów: 602
Pomógł: 30
Dołączył: 1.08.2007
Skąd: Nowy Sącz

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


Moja klasa wygląda tak
  1. <?php 
  2.  
  3. /*Zadanie pliku: wyświetlenie, dodawanie newsow, edytowanie, kasacja 
  4. ogólna klasa jest matką klas do edycji/ dodawania/ kasowania profilu, plotek, newsow*/
  5. Class Editor 
  6. {
  7. var $result;
  8. var $pathin = './../'; 
  9. public function ViewEditor($action, $tresc)
  10. {
  11. $this -> result = require_once($this->pathin.'oddFiles/EditorForm.php');
  12. return $this->result;
  13. }
  14.  
  15. public function ReturnResult()
  16. {
  17. $this -> result = ($_POST['zwroc_wynik'] == '') ? 'Nie wypełniono pola edytora' : $_POST['zwroc_wynik'];
  18. return $this -> result;
  19. }
  20.  
  21. public function __destruct ()
  22. {
  23. unset($result);
  24. }
  25. }
  26.  
  27. ?>


i jeśli zmienna $pathin jest równa ./../
to plik bez ajaxu wywali bug


  1. Warning: Editor::require_once(./../oddFiles/EditorForm.php) [function.Editor-require-once]: failed to open stream: No such file or directory in D:\Program Files\WebServ1\httpd\test\class\class.Editor.php on line 11
  2.  
  3. Fatal error: Editor::require_once() [function.require]: Failed opening required './../oddFiles/EditorForm.php' (include_path='.;C:\php5\pear') in D:\Program Files\WebServ1\httpd\test\class\class.Editor.php on line 11


a jeśli ./ to plik z ajaxem wywali bug

  1. Warning: Missing argument 2 for Editor::ViewEditor(), called in D:\Program Files\WebServ1\httpd\test\oddFiles\account.php on line 48 and defined in D:\Program Files\WebServ1\httpd\test\class\class.Editor.php on line 9



Prosze o pomoc
Go to the top of the page
+Quote Post

Posty w temacie


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: 20.08.2025 - 08:35