Create dummy index.html inside a new MKDR directory

Posted by jonnypixel on Stack Overflow See other posts from Stack Overflow or by jonnypixel
Published on 2011-01-14T02:25:53Z Indexed on 2011/01/14 2:53 UTC
Read the original article Hit count: 247

Filed under:

Hi,

I know this may be a silly question but i cant seem to find just a simple answer.

I have a php script that makes a directory for me when the user starts a new entry. That directory holds photos for their gallery.

What i would like to do is also create One index.html file inside that new directory with a few lines of html code in it.

How do i do this?

Im guessing that the file would be made like so:

mkdir('users/'.$id.'/index.html',0755);

But how do i add the html into that index.html file?

Or do i have one file on the server and copy it over into there during the MKDIR process?

Anyways a really simple answer would be best as i am very slow in this learning thing.

Thank you John

© Stack Overflow or respective owner

Related posts about mkdir