Jump to content

A small help with the exec() function


dragunu

Recommended Posts

Hello phpfreaks community.

 

I have the following code:

<?php

$exec = exec("/var/www/script.pl");
print $exec;

?>

 

now the output of the script is:

Line1
Line2
Line3
Line4

 

Now, with the php code above, i am only getting "Line4". How is it possible to insert everything in an array where the values are divided by a new line value?

 

thx

william

Link to comment
https://forums.phpfreaks.com/topic/53419-a-small-help-with-the-exec-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.