Jump to content


Photo

Creating a dir problems


  • Please log in to reply
3 replies to this topic

#1 smith.james0

smith.james0
  • Members
  • PipPipPip
  • Advanced Member
  • 122 posts

Posted 27 February 2006 - 08:05 PM

I need to create a dir www/images/visitor but my script is in www/data, how do i get it to create a dir there. I have tried
mkdir ("../images/visitors/$name", 0755);

but i get

PHP Parse error: parse error, unexpected '.', expecting ')'

Thanks James

#2 lpxxfaintxx

lpxxfaintxx
  • Members
  • PipPipPip
  • Advanced Member
  • 181 posts

Posted 27 February 2006 - 08:53 PM

Try this

mkdir ("/images/visitors/$name", 0755);


#3 smith.james0

smith.james0
  • Members
  • PipPipPip
  • Advanced Member
  • 122 posts

Posted 27 February 2006 - 09:30 PM

It doesn't like the /

PHP Warning: mkdir(/images/visitors/dave): No such file or directory

#4 smith.james0

smith.james0
  • Members
  • PipPipPip
  • Advanced Member
  • 122 posts

Posted 27 February 2006 - 10:21 PM

By trial and error i found it

mkdir ("/../images/visitors/$name", 0755);





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users