bence gayet mantikli bir e-posta thread'i o yuzden kimsenin rahatsiz
olacagini sanmiyorum, hatta belki daha cok cozum onerisi gelebilir.
backslash'leri (\) cift olarak yazip, kacirmayi dener misiniz? yani $u
sekilde olsun c:\\wamp\\www .. gibi
On 10/8/07, Guychmyrat Amanmyradov <guychmyrat_at_yahoo.com.tr> wrote:
>
> Başkaları rahatsız olmasın diye özellikle sizin maile yazdım.
>
> Tama, bundan sonra gruba gönderirim.
>
>
> <?php
>
> echo exec("ffmpeg/ffmpeg -i komik.mpg komik.flv");
>
> ?>
>
>
> Şu kodu koşturduğum zaman, tıkanıp kalıyor. Hiçbir işlem yapmıyor.
>
> Araştırarak daha gelişmiş bir kod bulum oda şu :
>
>
>
>
>
> <?php
>
> runExternal( "C:\wamp\www\proje\ffmpeg -i komik.mpg komik.flv", &$code
> );
>
> if( $code )
> echo "bad transcoding";
> else
> echo "looks good";
>
> function runExternal( $cmd, &$code ) {
>
> $descriptorspec = array(
> 0 => array("pipe", "r"), // stdin is a pipe that the child will
> read from
> 1 => array("pipe", "w"), // stdout is a pipe that the child will
> write to
> 2 => array("pipe", "w") // stderr is a file to write to
> );
>
> $pipes= array();
> $process = proc_open($cmd, $descriptorspec, $pipes);
>
> $output= "";
>
> if (!is_resource($process)){
> echo "falseeee";
> return false;
> }
>
>
>
> #close child's input imidiately
> fclose($pipes[0]);
>
> stream_set_blocking($pipes[1],false);
> stream_set_blocking($pipes[2],false);
>
> $todo= array($pipes[1],$pipes[2]);
>
> while( true ) {
> $read= array();
> if( !feof($pipes[1]) ) $read[]= $pipes[1];
> if( !feof($pipes[2]) ) $read[]= $pipes[2];
>
> if (!$read) break;
>
> $ready= stream_select($read, $write=NULL, $ex= NULL, 2);
>
> if ($ready === false) {
>
> break; #should never happen - something died
> }
>
> foreach ($read as $r) {
> $s= fread($r,1024);
> $output.= $s;
> echo "output : ".$output;
> }
> }
>
> fclose($pipes[1]);
> fclose($pipes[2]);
>
> $code= proc_close($process);
>
> return $output;
> }
>
> ?>
>
> Bu koda da şöyle hata veriyor :
>
> 'C:\wamp\www' iç ya da dış komut, çalıştırılabilir program ya da toplu içdosyas
> ı olarak tanınmıyor
>
> ------------------------------
> Yahoo! kullaniyor musunuz?
> Istenmeyen postadan biktiniz mi? Istenmeyen postadan en iyi korunma Yahoo!
> Posta'da
> http://tr.mail.yahoo.com
>
>
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama_at_liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
>
>
-- dendiz http://dendiz.blogspot.com
_______________________________________________
Linux-programlama mailing list
Linux-programlama_at_liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama
Received on Tue 09 Oct 2007 - 08:24:19 EEST