Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Komenda system - echo w kodzie, Informacje o wyniku w kodzie
icemanwlkp
post
Post #1





Grupa: Zarejestrowani
Postów: 50
Pomógł: 1
Dołączył: 29.09.2010

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


Witam, korzystam z komendy systemowej , serwer stoi pod win i mam taki kłopot :

  1. $komenda = 'copy a.txt b.txt';
  2. system($komenda,$komunikat);

Problem w tym ,iż na stronie wrzuca mi napis "Skopiowano plik 1." Jak wyłączyć wynik tej komendy jej echo ?

Ten post edytował icemanwlkp 6.11.2014, 08:32:22
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
nospor
post
Post #2





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




http://php.net/system
Cytat
The system() call also tries to automatically flush the web server's output buffer after each line of output if PHP is running as a server module.

If you need to execute a command and have all the data from the command passed directly back without any interference, use the passthru() function.


Od biedy mozesz pobawic się funkcjami z rodziny ob_
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 13:50