I wanted to copy a file by using exec function of php
which executes command prompt line.
my syntex is :
$FilePath="G:\files\";
$UploadFileName=$FilePath."BJ004.gif";
$ConvertedFileName=$FilePath."FK.gif";
exec ("copy ".$UploadFileName." ".$ConvertedFileName);
But when I run the php file it gives an error
Error is :
Warning: Unable to fork [copy D:\files\BJ004.gif D:\files\FK.gif] in d:\nsdocs\cms\phpinfo.php on line 16
I thought it is my problem.
so I tried in different way.
That is I ran it by using dos prompt.
and esecuting it
D:>copy D:\files\BJ004.gif D:\files\FK.gif
1 file(s) copied.
and it has copied successfully.
so how can I solve my problem.
I wanted to copy from php by using exec command.
Pls help me.
If some one knows how to solve pls mail me at :
[email protected]