i'm testing project wamp, had problem when upload file , copy, returns:
failed open stream: http wrapper not support writeable connections in c:\wamp\www\
what can do?
here's code:
<?php session_start(); if ( isset($_session['user']) ) { $nombre=$_session['user']; $nombrefoto=$_files['foto']['name']; $ruta=$_files['foto']['tmp_name']; $destino = "http://localhost/usuarios/".$_session['user'].".jpg"; copy($ruta,$destino); } else { } ?>
you need have writable filesystem set copy destination ... mean.
$destino = $_server["document_root"]."/usuarios/".$_session['user'].".jpg"; copy($ruta,$destino);
make sure usuarios directory in document root exists , writable web server.
Comments
Post a Comment