Web Analytics Made Easy -
StatCounter How to run 'file -bi C:\filename.extension' command in PHP? - CodingForum

Announcement

Collapse
No announcement yet.

How to run 'file -bi C:\filename.extension' command in PHP?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to run 'file -bi C:\filename.extension' command in PHP?

    I tried
    system(trim('file -bi'.escapeshellarg('C:\filename.extension')));

    but nothing showed to the screen.

    If I tried to run the command in the command line, it works fine.

    Thank you very much for the help!

  • #2
    Originally posted by php.net
    string system ( string command [, int &return_var] )

    system() is just like the C version of the function in that it executes the given command and outputs the result.

    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.
    system()

    Comment

    Working...
    X