PHP Program Execution Problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi All

Im having a minor issue performing a system command with exec().  I
want to use the filenames of files that I uploaded within the command,
but cannot escape once inside the exec() function.  For example, lets
say I just uploaded two files, file1.txt and file2.txt.  I want to list
the contents of those two files by using the command:

cat file1.txt file2.txt

But I'm having problems using the names of the files uploaded.  I used
a for loop to grab each file name and put them in an array, and can
successfully view the array to verify its contents.  The problem occurs
when I try this:

exec('cat " . $Array['0'] . " ....blah blah

This is just an example so you can understand what Im trying to


Re: PHP Program Execution Problem

Quoted text here. Click to load it

You probably need to move the files from the temporary upload directory
before you can process them.

See < and
< .


Site Timeline