Re: [PHP] upload on Win9x
yes... it goes like Have you set the content type of the form to be multipart MIME ? That >screws me every time... > >AndrewH > >- Original Message - >From: "Christian Dechery" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Tuesday, June 19, 2001 11:16 AM >Subject: [PHP] upload on Win9x > > > > I can't get file uploads to work on my Windows 98Me running >Apache+PHP4.05... > > > > I did everything correctly according to the script I found on >phpbuilder... > > > > it simply won't go... the error message is something like "can't open > > c:\file.ext for reading"... it's like it thinks it's a local file... this > > is the code... > > > > $upload_dir="c:\\apache\\htdocs\\mydir\\"; > > $upload_tmp_path=ini_get("upload_tmp_dir"); // this returns the correct > > path BTW > > > > $file=stripslashes($file); > > $newfile=$upload_dir."file.tmp"; // just for debugging, but it still > > doesn't work... > > > > chdir($upload_tmp_path); > > if(!copy($file,$newfile)) > > echo "Error uploading > > $newfile."; > > else > > process_file($newfile); > > > > > > . Christian Dechery (lemming) > > . http://www.tanamesa.com.br > > . Gaita-L Owner / Web Developer > > . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer
Re: [PHP] upload on Win9x
Have you set the content type of the form to be multipart MIME ? That screws me every time... AndrewH - Original Message - From: "Christian Dechery" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 19, 2001 11:16 AM Subject: [PHP] upload on Win9x > I can't get file uploads to work on my Windows 98Me running Apache+PHP4.05... > > I did everything correctly according to the script I found on phpbuilder... > > it simply won't go... the error message is something like "can't open > c:\file.ext for reading"... it's like it thinks it's a local file... this > is the code... > > $upload_dir="c:\\apache\\htdocs\\mydir\\"; > $upload_tmp_path=ini_get("upload_tmp_dir"); // this returns the correct > path BTW > > $file=stripslashes($file); > $newfile=$upload_dir."file.tmp"; // just for debugging, but it still > doesn't work... > > chdir($upload_tmp_path); > if(!copy($file,$newfile)) > echo "Error uploading > $newfile."; > else > process_file($newfile); > > > . Christian Dechery (lemming) > . http://www.tanamesa.com.br > . Gaita-L Owner / Web Developer >
[PHP] upload on Win9x
I can't get file uploads to work on my Windows 98Me running Apache+PHP4.05... I did everything correctly according to the script I found on phpbuilder... it simply won't go... the error message is something like "can't open c:\file.ext for reading"... it's like it thinks it's a local file... this is the code... $upload_dir="c:\\apache\\htdocs\\mydir\\"; $upload_tmp_path=ini_get("upload_tmp_dir"); // this returns the correct path BTW $file=stripslashes($file); $newfile=$upload_dir."file.tmp"; // just for debugging, but it still doesn't work... chdir($upload_tmp_path); if(!copy($file,$newfile)) echo "Error uploading $newfile."; else process_file($newfile); . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer