I kind of have a big problem on my hands here. I have to make an entire website in the ASP language, which I'm not familier with at all. I've got some PhP experience, but there is still much left to learn.
I'm going to try to make this in PHP style, but now I have a couple of questions, I hope you can help me.
Is it possible to list files in a normal windows folder on a website using php a php script? So use the windows folder as the database.
If so, is it possible to read files using php like .txt files?
And is it also possible to delete or move files in a windows folder?
Very complicated stuff, I just need to know if this isn't a waste of time ^^
Thnx in advance.
Reading windows files and folders using php scripts?
Moderator: General Moderators
- Dark-Rival
- Forum Newbie
- Posts: 21
- Joined: Thu Apr 15, 2004 5:03 am
- Location: Amsterdam
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
Yep its all possisble, check out the filesystem manual page on php.net - http://uk.php.net/manual/en/ref.filesystem.php
try this
hi Dark,
Q1 Is it possible to list files in a normal windows folder on a website using php a php script?
Try this Dir
$d = dir("/etc");
echo "Handle: ".$d->handle."<br>\n";
echo "Path: ".$d->path."<br>\n";
while (false !== ($entry = $d->read())) {
echo $entry."<br>\n";
}
$d->close();
Q2.is it possible to read files using php like .txt files?
Yes.
int readfile ( string filename [, bool use_include_path])
Q3. Is it also possible to delete or move files in a windows folder?
Try this int unlink ( string filename)
Waiting 4 ur kind response
dipit
Q1 Is it possible to list files in a normal windows folder on a website using php a php script?
$d = dir("/etc");
echo "Handle: ".$d->handle."<br>\n";
echo "Path: ".$d->path."<br>\n";
while (false !== ($entry = $d->read())) {
echo $entry."<br>\n";
}
$d->close();
Q2.is it possible to read files using php like .txt files?
int readfile ( string filename [, bool use_include_path])
Q3. Is it also possible to delete or move files in a windows folder?
Waiting 4 ur kind response
dipit
- Dark-Rival
- Forum Newbie
- Posts: 21
- Joined: Thu Apr 15, 2004 5:03 am
- Location: Amsterdam