I am trying a simple file upload, but cannot make it work on my
localhost. I wrote the following code:
$strFileDir = "/images/gallery/";
$strFileName = $strFileDir . $_FILES['fImage']['name'];
if (move_uploaded_ file($_FILES['fImage']['tmp_name'],$strFileName)) ;
{
echo ("Success");
}
....but get the following errors when uploading "gallery_1.gif" :
Warning: move_uploaded_f ile(/images/gallery/gallery_1.gif): failed to
open stream: No such file or directory in
C:\Development\ ChasityChase.co m\www\admin\ima ge\image.php on line 16
Warning: move_uploaded_f ile(): Unable to move
'C:\PHP\uploadt emp\phpE4.tmp' to '/images/gallery/gallery_1.gif' in
C:\Development\[sitename]\www\admin\imag e\image.php on line 16
/images/gallery/gallery_1.gif
I am working in Windows XP Pro/IIS, in case you couldn't tell.
Thanks in advance,
james
localhost. I wrote the following code:
$strFileDir = "/images/gallery/";
$strFileName = $strFileDir . $_FILES['fImage']['name'];
if (move_uploaded_ file($_FILES['fImage']['tmp_name'],$strFileName)) ;
{
echo ("Success");
}
....but get the following errors when uploading "gallery_1.gif" :
Warning: move_uploaded_f ile(/images/gallery/gallery_1.gif): failed to
open stream: No such file or directory in
C:\Development\ ChasityChase.co m\www\admin\ima ge\image.php on line 16
Warning: move_uploaded_f ile(): Unable to move
'C:\PHP\uploadt emp\phpE4.tmp' to '/images/gallery/gallery_1.gif' in
C:\Development\[sitename]\www\admin\imag e\image.php on line 16
/images/gallery/gallery_1.gif
I am working in Windows XP Pro/IIS, in case you couldn't tell.
Thanks in advance,
james
Comment