Answer the question
In order to leave comments, you need to log in
Error when generating CRUD code with Gii?
I'm starting to learn Yii2.
Can't generate CRUD code in Gii.
Error keeps popping up
PHP Warning – yii\base\ErrorException
mkdir(): File exists
1. in /var/www/html/yii/basic/vendor/yiisoft/yii2-gii/Generator.php at line 226
public function saveStickyAttributes()
{
$stickyAttributes = $this->stickyAttributes();
$stickyAttributes[] = 'template';
$values = [];
foreach ($stickyAttributes as $name) {
$values[$name] = $this->$name;
}
$path = $this->getStickyDataFile();
@mkdir(dirname($path), 0755, true); <------- 226
file_put_contents($path, json_encode($values));
}
Answer the question
In order to leave comments, you need to log in
Well, for some reason, there is a file whose name matches the name of the directory, which should be created where using mkdir
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question