hi 

how to get the byte stream in php 

like in JSP i am using this code  in JSP

<%
 
        try{
  ServletInputStream in = request.getInputStream();
  byte[] line = new byte[8192];
  int bytes = 0;
  FileOutputStream fileOutS = new 
FileOutputStream(fileOut);

  while(0 <(bytes = in.read(line))){
     fileOutS.write(line,0, bytes);
                          
   }
             
 fileOutS.close();
 fileOutS = null;
out.println("SUCCESSFUL : Upload Stream Saved to \"" +
fileOut + "\".");
 }catch(Exception e){
 out.println("ERROR : Exception \"" + e.getMessage() +
"\" Occured.");
    }
%>


now i have to write the same fuctionality in PHP


i tried the following code  it is also not a solution
for my problem

$request  =  new Java("javax.ServletRequest",$req);
$request -> getInputStream();
                 
$in =    $new
Java("javax.servlet.ServletInputStream",$in);

 $byte[] =  new Java("java.lang.byte",$line);
  
                  $bytes = 0;
                        
 new Java("java.io.FileOutputStream", $fileOutS)
                        
                  $fileOutS = new Java(
FileOutputStream($dir$file));

   while(0 <($bytes = in ->read($line))){
                  
  $fileOutS->write($line,0, $bytes);

                          }             

but i have to write  it with out using java extension
in PHP    

i am new to php . Your Help is appreciated

Thanking You
Regards 
Kumar


        
                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to