exec ("sendfax -d 555-1212 /path/to/faxfile.txt");
it workes fine, but when I try
$comand = "sendfax -d 555-1212 /path/to/faxfile.txt";
exec ($comand);
it won't work, or if I try to use a variable in the first example (like
for the phone #) it won't work. I'm stumped, although thats not saying
much since I am fairly new to this. Any infromation is greatly
apprciated.
Thanks for the help
In a fit of excitement on Fri, 22 Nov 2002 22:11:47 GMT, Eric Presley
<er...@presleydesign.com> managed to scribble:
my $command = `sendfax -d 555-1212 /path/to/faxfile.txt`;
will execute the command and store the returned output in $command.
Even if your method did work, you'd be rteying to execute the output of
the command, not the actual command.
HTH.
Regards,
Ian
-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Privacy 6.5.3
iQA/AwUBPd6tv2fqtj251CDhEQLMYQCghPrjoAVYebDNGSOHy+Ea99aBUsUAnjnR
bBSjQdjVHGWWOjHiQFkrKPMN
=DaTN
-----END PGP SIGNATURE-----
--
Ian.H (Design & Development)
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Scripting, Web design, development & hosting.
exec ("sendfax -d ".$phone." file.txt");
it wont work, where
exec ("sendfax -d 555-1212 file.txt");
workes
I tried system(), passthru(), `command` and same problem with all
thanks
Is there anything in your web server's log file? Are you sure that your
$phone really contains the phone number (try printing $phone)? Also try
printing the return value of exec() and the third parameter
(return_var), maybe it is telling you what it doesn't like.
Regards...
Michael