Search code examples
phpdirectorycreation

Cant create folder inside the folder in Ubuntu using php


Can any one say how we can create folder using php.

I tried to create folder inside /var/www/php but it fails . Why is it so?

My code is like this

<?php
$path=getcwd.'/images';
mkdir($path,777);
?>

What is the error in this script.


Solution

  • you use the wrong function change getcwd to getcwd() and it will work.