ftp - PHP mkdir creates bad / corrupt directories? -


i have image uploader, directory should dynamic based on variable. works on it's own except creating directory. directory appears in winscp , php code echo's image has been uploaded there when trying directory error:

error changing directory to'foobar'.    can't change directory foobar: no such file or directory. 

below relevant code issue (i think).

$target_dir = "../images/ " . $model_name . "/"; if (!file_exists("$target_dir")) { mkdir("$target_dir", 0777, true); } 

i should able log onto linux , rmdir -rf terminal rid of directory know causing , if there fix.

thanks

nick


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -