Creating a folder |
[eluser]Unknown[/eluser]
Hello guys.I have the following problem: I am trying to create a folder with mkdir() but it's not working right. My base_url() is 'http://localhost/mysite/'. If i write the code that way.. mkdir(base_url().'images/folder',0777) it's not working but if i write it mkdir('images/folder',0777) the folder is created. So i wonder why the base_url() gives a problem . Thanks in advance.
[eluser]smilie[/eluser]
PHP mkdir function expects a path on the disk, not an URL. http://php.net/manual/en/function.mkdir.php Attempts to create the directory specified by pathname. It can not create directory on a website basis :-) It's just... wrong :-) Cheers, Smilie |
Welcome Guest, Not a member yet? Register Sign In |