Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> fopen - pomocy!
colinQ
post 29.08.2007, 12:30:03
Post #1





Grupa: Zarejestrowani
Postów: 340
Pomógł: 2
Dołączył: 25.12.2006

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


  1. <?php
  2. // TWORZENIE KATALOGU
  3.  
  4. mkdir("$domyslny", 0777); // tworze folder z nazwa zmiennej domyslny
  5. chmod("$domyslny", 0777); // ustawiam mu chmody
  6.  
  7.  
  8. // TWORZENIE index.php
  9.  
  10. $index = fopen("$domyslny/index.php", 'w'); // tworze plik index.php w tym folderze
  11.  
  12. $pliczek = file("default.txt"); // wczytuję zawartosc default.txt
  13.  
  14. for($a=0; $a<=9; $a++) // zapisuję ja do pliku ze zmiennej index
  15. { 
  16. $ed = $pliczek[$a];
  17. fwrite($index, $ed);
  18. }
  19. ?>


Na localhoscie było dobrze ale już w necie wywala błędy.

po wstawieniu

  1. <?php
  2. if($index) 
  3. echo 'ok';
  4. ?>


nie wyświetla ok czyli ma problem z utworzeniem pliku bo folder jest pusty!!!

HELP sadsmiley02.gif


--------------------
-> Kanał YouTube: http://www.youtube.com/user/screencup
-> Screencup - podcast/screencast, recenzja Makowych aplikacji
-> www.screencup.pl - witryna internetowa podcastu
Go to the top of the page
+Quote Post
qqrq
post 29.08.2007, 12:47:59
Post #2





Grupa: Zarejestrowani
Postów: 418
Pomógł: 8
Dołączył: 16.11.2006

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


Może na serwerze włączony jest safe_mode?? Ja miałem z tym syfem parę problemów (zwłaszcza jeśli chodzi o manipulowanie katalogami, jak tutaj) i dobrze radzę (nie ja pierwszy na tym forum zresztą) - uciekaj od safe mode'a jak najdalej...


--------------------
Go to the top of the page
+Quote Post
colinQ
post 29.08.2007, 12:58:09
Post #3





Grupa: Zarejestrowani
Postów: 340
Pomógł: 2
Dołączył: 25.12.2006

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


Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The script whose uid/gid is 4647/1005 is not allowed to access /freebox/zetnij/3313 owned by uid/gid 28/28 in /freebox/zetnij/index.php on line 57

Warning: fopen(3313/index.php) [function.fopen]: failed to open stream: Permission denied in /freebox/zetnij/index.php on line 57

Warning: fwrite(): supplied argument is not a valid stream resource in /freebox/zetnij/index.php on line 64

Warning: fwrite(): supplied argument is not a valid stream resource in /freebox/zetnij/index.php on line 64

Warning: fwrite(): supplied argument is not a valid stream resource in /freebox/zetnij/index.php on line 64

Warning: fwrite(): supplied argument is not a valid stream resource in /freebox/zetnij/index.php on line 64

Warning: fwrite(): supplied argument is not a valid stream resource in /freebox/zetnij/index.php on line 64

Warning: fwrite(): supplied argument is not a valid stream resource in /freebox/zetnij/index.php on line 64

Warning: fwrite(): supplied argument is not a valid stream resource in /freebox/zetnij/index.php on line 64

Warning: fwrite(): supplied argument is not a valid stream resource in /freebox/zetnij/index.php on line 64

Warning: fwrite(): supplied argument is not a valid stream resource in /freebox/zetnij/index.php on line 64

Warning: fwrite(): supplied argument is not a valid stream resource in /freebox/zetnij/index.php on line 64

^^^^^^^^^^^^^^^^^^takie cos wywala^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


a jak probuje w Total Comanderze zmienić atrybuty to wywala że nie może zmienić atrybutów zdalnego pliku


--------------------
-> Kanał YouTube: http://www.youtube.com/user/screencup
-> Screencup - podcast/screencast, recenzja Makowych aplikacji
-> www.screencup.pl - witryna internetowa podcastu
Go to the top of the page
+Quote Post
qqrq
post 29.08.2007, 14:08:00
Post #4





Grupa: Zarejestrowani
Postów: 418
Pomógł: 8
Dołączył: 16.11.2006

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


Pierwszy warning (Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The script whose uid/gid is 4647/1005 is not allowed to access /freebox/zetnij/3313 owned by uid/gid 28/28 in /freebox/zetnij/index.php on line 57) mówi nam, że na serwerze jest SAFE MODE - szczerze powiem, nie wiem co z tym zrobić poza ucieczką aarambo.gif
Pisałem - miałem podobny problem. Nie znam sposobu, żeby zmienić UID i GID pliku/katalogu...


--------------------
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: 25.06.2025 - 18:13