[Linux-programlama] Re: Merhaba.

---------

[Linux-programlama] Re: Merhaba.

From: Güyçmırat Amanmırat <guychmyrat_at_yahoo.com.tr>
Date: Tue, 9 Oct 2007 09:56:48 +0300
Message-Id: <20071009065657.098D01170B5@mail.linux.org.tr>

Çok teşekkür ederim.

 

 

Nihayet oldu.

 

Ben tam bitiriyim kodu, detaylı bir şekilde nasıl yapıldığını anlatarak
yazarım. Başkalarınada yararlı olsun.

 

Tekrar teşekkür ederim.

 

  _____

From: linux-programlama-bounces_at_liste.linux.org.tr
[mailto:linux-programlama-bounces_at_liste.linux.org.tr] On Behalf Of Deniz
Dizman
Sent: Tuesday, October 09, 2007 8:51 AM
To: linux-programlama_at_liste.linux.org.tr
Subject: [Linux-programlama] Re: Merhaba.

 

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 <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 
__________________________________________________
Yahoo! kullanıyor musunuz?
İstenmeyen postadan bıktınız mı?  Yahoo! Posta'da piyasanın en iyi istenmeyen posta korunması var 
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

__________________________________________________
Yahoo! kullanıyor musunuz?
İstenmeyen postadan bıktınız mı? Yahoo! Posta'da piyasanın en iyi istenmeyen posta korunması var
http://tr.mail.yahoo.com
Received on Tue 09 Oct 2007 - 09:30:42 EEST

---------

Bu arsiv hypermail 2.2.0 tarafindan uretilmistir.