You are here: Re: exec() on Windows « PHP Programming Language « IT news, forums, messages
Re: exec() on Windows

Posted by Jerry Stuckle on 10/06/06 17:29

Gio wrote:
> Hi all,
> this is my problem: I need to "exec" the following command:
>
> C:\Programmi\Soft\soft.exe -v -d C:\dati\$nomefile
> C:\dati\pdf\$filename
>
> and i tried to execute it in php with (one of) the following lines....
>
> exec("C:\Programmi\Soft\soft.exe -v -d C:\dati\.$nomefile
> C:\dati\pdf\.$filename");
> exec("C:\Programmi\Soft\soft.exe" -v -d "C:\dati\".$nomefile
> "C:\dati\pdf\".$filename);
> exec("C:\\Programmi\\Soft\\soft.exe -v -d C:\\dati\\.$nomefile
> C:\\dati\\pdf\\.$filename");
> exec("C:/Programmi/Soft/soft.exe -v -d C:/dati/.$nomefile
> C:/dati/pdf/.$filename");
> exec("C:/Programmi/Soft/soft.exe" -v -d "C:/dati/".$nomefile
> "C:/dati/pdf/".$filename);
>
> but there is something wrong and that i.. do not understand...
> Is there anyone so kind to show me the correct line and a couple of
> comments on how to built it? I tried to search for it (manual,
> newsgroups...) but i haven't found it (and my mistakes are the result
> :-P)
>
> Thanks in advance,
> Giorgio
>
> System:
> Windows 2000 Server (Italian)
> PHP 4.4.4
> Apache 2.0.59
> Mysql 4.1.21
>

Try:

exec("C:\\Programmi\\Soft\\soft.exe -v -d C:\\dati\\$nomefile
C:\\dati\\pdf\\$filename");

Also,

exec("C:/Programmi/Soft/soft.exe -v -d C:/dati/$nomefile
C:/dati/pdf/$filename");

should work (Windows understands '/' - just the command interpreter
doesn't).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация