upload file to network drive in php -


php script uploading file mapped network drive not working . following php script:

$newfilename = "something.wav"; $path  = 'y:\\uploaded\\'.$newfilename; copy($_files['ufile']['tmp_name'], $path); 

i have check permission network drive folder.i have y drive mapped network drive(10.4.4.32) d drive within uploaded folder. have full control permission. have tried following path network drive:

  • y:\uploaded\
  • \\10.4.4.32\d$\uploaded\
  • move_uploaded_file($_files['ufile']['tmp_name'], $path);

but, works on local drive like:

  • d:\uploaded\ file uploaded in local drive not uploaded in network drive. have used php 5.3 , iis 7 application

errors showed: warning: copy(\10.4.4.32\d$\uploaded\test.wav): failed open stream: permission denied in c:\inetpub\wwwroot\myapp\upload.php on line 107

i have allow permission of full control in properties of uploaded folder user. there other permission , should fixed.

first, check if copy() returns false. indicates there error.

then, enable track_errors directive in php.ini, display_errors , error_reporting highest level. when track_errors activated (and restarted webserver), use following line after copy:

var_dump($php_errormsg, error_get_last()); 

this should give better hint problem.


also make sure if you're using safe_mode , open_basedir, path you're moving allowed.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -