spikeon Posted February 29, 2008 Share Posted February 29, 2008 ok, i have an issue here lets say that i have http://www.google.com/logos/leapyear08.gif and i want to put it in folder: www.google.com/logos/ with name : leapyear08.gif heres what i got and it ain't workin... $filesave = "stealPhotos/" . str_replace("http://", "",$_POST[$_config['url_var_name']]); $dirs = explode("/",$filesave); for($i = 0; $i <= (count($dirs)-2); $i++){ for($j = 0; $j <= $i; $j++){ $am .= $dirs[$j] . "/"; } if(!file_exists($am)){ @mk dir($dirs[$i], "0777"); } } $fh = @f open($filesave, 'w'); @f write($fh, $_responce_body); @f close($fh); the folders aren't even getting created for the issue of the forums hating me, spaces have been added to specific code items. they are NOT my mistake Link to comment https://forums.phpfreaks.com/topic/93698-help-with-making-files-and-folders-and-such/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.