Chce napisac skrypt upladujacy obrazki na zdalny serwer, napisalem kilka prostych linijek, i dziala toto, ale tylko na wrzut do katalogu na tym samym serwerze.
Kod:
<form name="form1" method="post" action="" enctype="multipart/form-data" /> <input type="file" name="imagefile"> <br /> <input type="submit" name="submit" value="submit" /> <? { if ($_FILES['imagefile']['type'] == "image/jpeg"){ copy ($_FILES['imagefile']['tmp_name'], "http://img.aftersound.info/okladki/".$_FILES['imagefile']['name']) } else { } } ?> </form>
Tresc bledu po uploadzie:
Warning: copy(http://img.aftersound.info/okladki/av-1.jpg) [function.copy]: failed to open stream: HTTP wrapper does not support writeable connections. in c:\documents and settings\tomek\Pulpit\www\wortal\up_img.php on line 9
Dzieki z gory
