I bit you are doing something like this:
copy("$file", "file") ;



----- Original Message -----
From: "marcelo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 02, 2002 11:19 AM
Subject: [PHP] uping to plaese help


> Hi need some help please
>
> What is wrong with my code?
>
> it is supposed to upload 2 files but instead gives me this error
>
>
>
>
>
>
>
> Warning: Unable to open 'Array' for reading
>
>
>
>
>
> The code
>
>
>
>
>
>
>
>
>
> <html>
> <head>
> <title>O Leme upload</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
>
> <body>
>
> <?php
>
>
>
> $PHP_SELF = $_SERVER['PHP_SELF'];
> $page = $_REQUEST['page'];
> $origem = $_FILES['origem'];
> $origem2 = $_FILES['origem2'];
>
>
>
> switch($page)
> {
>  case "um":
>     um($origem ,$origem2);
>  break;
>  case "dois":
>   dois($origem, $origem2);
>  break;
>
>  default:
>   um($origem ,$origem2);
>  break;
> }
>
> function um($origem ,$origem2)
>
>
> {
>
> ?>
>
>
>
> <title>Jornal O Leme</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
>
> <body bgcolor="#006699">
> <table width="100%" border="0" cellpadding="0" cellspacing="0">
>   <!--DWLayoutTable-->
>   <tr>
>     <td width="100%" height="70" valign="top"><img src="test.jpg"
> width="600" height="120">
>     </td>
>   </tr>
>   <tr>
>     <td height="262" valign="top"><p>&nbsp;</p>
>       <form method="post"  action="<?php $PHP_SELF ?>"
> enctype="multipart/form-data">
>         <table width="75%" border="0" align="center" bgcolor="#FFFFFF">
>           <tr>
>             <td width="23%"><div align="center"><font face="BankGothic Md
> BT">
>                 </font></div></td>
>             <td width="77%" bgcolor="#FFFFFF">&nbsp; </td>
>           </tr>
>           <tr>
>             <td><div align="center"></div></td>
>             <td bgcolor="#FFFFFF">&nbsp; </td>
>           </tr>
>           <tr>
>             <td><div align="center"></div></td>
>             <td bgcolor="#FFFFFF">&nbsp; </td>
>           </tr>
>           <tr>
>             <td><div align="left"><strong>Imagem
pequena</strong></div></td>
>             <td bgcolor="#FFFFFF"> <input type=hidden name=MAX_FILE_SIZE
> value=102400>
>               <input type="File" name="origem"> </td>
>           </tr>
>           <tr>
>             <td><div align="left"><strong>Imagem
grande</strong></div></td>
>             <td bgcolor="#FFFFFF"><input type=hidden name=MAX_FILE_SIZE
> value=102400>
>               <input type="File" name="origem2"> </td>
>           </tr>
>           <tr>
>             <td><div align="center"></div></td>
>             <td bgcolor="#FFFFFF">&nbsp; </td>
>           </tr>
>           <tr>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>           </tr>
>         </table>
>         <p align="center">
>           <input name="submit" type="submit" value="Adicionar">
>     <input type="hidden" name="page" value="dois">
>       </form></p>
>       </td>
>   </tr>
>   <tr>
>     <td height="81" valign="top"><div align="center">
>         <p>&nbsp;</p>
>         <p>
>   <?php
>
>   include ('menu.php');
>
>   ?>
>   &nbsp;</p>
>       </div></td>
>   </tr>
> </table>
>
>
> <?php
>
>
>
> }
>
>
>
>
> function dois($origem, $origem2)
>
>
> {
> set_time_limit(60);
> $path=(dirname($PATH_TRANSLATED))."../primeirapagina/";
> $origem_name="pppv2.jpg";
> $dest= $path.$origem_name;
>
> if (($origem <> "none") && ($origem <> "")){
>    if (copy($origem,$dest)){;
>
>      } else {
>       echo "directoria sem direitos de escrita <br>";
>       }
> unlink ($origem);
> }
>
> set_time_limit(60);
> $path2=(dirname($PATH_TRANSLATED))."../primeirapagina/";
> $origem2_name="ppv2.jpg";
> $dest2= $path2.$origem2_name;
>
> if (($origem2 <> "none") && ($origem2 <> "")){
>    if (copy($origem2,$dest2)){;
>
> } else {
>       echo "directoria sem direitos de escrita <br>";
>       }
> unlink ($origem2);
> }
>
>
>
>
> }
>
>
>
>
>
> ?>
> </body>
> </html>
>
>
>
>
> and yes i am new to php
>
> tk
>
>
>
>
>
> Marcelo Salvador
>
> www.sinesdigital.pt
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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

Reply via email to