Reputation: 502
What's the error in here?
<?php
define('TMP_FOLDER','temp');
$temp_dir = $this->dir['root'].$this->config['sep'].TMP_FOLDER;
//$temp_dir = C:\xampp\htdocs\xxx\temp
//$this->dir['root'] = C:\xampp\htdocs\xxx
if(!file_exists($temp_dir) && !is_dir($temp_dir)){
chdir('../');
mkdir(TMP_FOLDER, 0744);
}
?>
This throws a warning like:-
Warning: mkdir(): File exists in C:\xampp\htdocs\xxx\yyy\display.php on line 49
I think this is an easy job. But, I can't understand what's this?
Upvotes: 0
Views: 609
Reputation: 502
Found it, I removed the line
chdir('../');
changing the directory, directed to c:\xampp\htdocs. Removing this solved the problem.
Upvotes: 0