...

View Full Version : File manipulation



SpeedFreak
09-29-2003, 07:58 PM
Hey,

I am writing a very very simple CMS for a project i am working on and i am stuck in 2 areas.

1stly, How can i create a file in a specified directory and make PHP chmod the file 666?

2ndly, I would like to be able to get PHP to list all of the files in a directory in the order they appear (preferably in an array).

How can i do this?

Thanks

Nightfire
09-29-2003, 08:46 PM
<?php
$directory = mkdir('/path/to/dir',0666); (http://uk2.php.net/manual/en/function.mkdir.php)
?>


http://uk2.php.net/manual/en/function.readdir.php

SpeedFreak
09-29-2003, 08:59 PM
thanks for that nightfire, except i dont want to create a directory, i want to create a file (ASCII) within a directory.

Thanks

Spookster
09-29-2003, 09:07 PM
http://us3.php.net/manual/en/function.chmod.php

Nightfire
09-29-2003, 09:30 PM
Ahh, sorry. Was in a rush and didn't read properly :) *runs to work*



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum