CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 How do you excute DOS commands through PHP4

Print topic Send  topic

Author Message
Deano
Posted: 02/04/2002, 8:08 AM

I have a series of DOS Batch files which when run copy files from a floder to the floppy disk. I would like to be able to do this over the net using PHP. I have tried but no can do.

example file would be

md a:\dira
copy c:\download\file1.doc a:\dira
exit

which i have changed now to read
md a:\dira
copy \admin1\c\download\file1.doc a:\dira
exit

which works fine from DOS but how do i do it in PHP

Thanks

Dean
Nicole
Posted: 02/05/2002, 1:12 AM

Deano,
try to use PHP function to create folder and copy files, e.g.:
mkdir("folder_name",0777);
copy($sourcefile_name,$destfield_name);

Refer to PHP manual for more information about mentioned functions:
http://www.php.net/manual/en/ref.filesystem.php
Deano
Posted: 02/06/2002, 3:01 AM

the problem with this seems to be that the function is run on the server and cannot copy to the client machine. Yes i could use Copy function but it will only copy from folder to folder on the server. i want server to client without user intervention. i can get the list of files to be copied in a folder but then the user must do a save as to his floppy disk. There must be an easier way

Thanks

Dean

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.