php-windows Digest 23 Dec 2003 17:42:28 -0000 Issue 2054
Topics (messages 22419 through 22420):
configuring sessions
22419 by: Henrik Niehaus
open directory and read the file
22420 by: Idur
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
win 2000 pro
apache 1.3.29
php 4.3.4 (register_globals off)
i want to use sessions. i haven't change anything in the configuration
expect the session.save_path. when i try to create a session, the
session file appears in the specified directory, but if i try to
continue this session in another php document, php doesn't use this
session, but creates a new session file. what's going wrong?
i've tried to change the session.save_path and tested with
session.use_trans_sid on/off. but the sessions don't want to function
properly.
regards,
henrik
--- End Message ---
--- Begin Message ---
Hi there,
I want read a directory and open a file inside the directory, for example directory
data contains of file:
Computername.txt
IPaddress.txt
status.txt
and i want search a file on the directory and open it, for example i want search file
IPaddress.txt and when file IPaddress.txt found, i want open it, read and display the
contains of the file.
the script that i have is like this :
<?php
$find_file="name.txt";
if ($handle = opendir('C:\apache\htdocs')){
while (false !== ($file = readdir($handle))){
if ($file == $find_file){
echo " file found $file<br>";
// i want to open the file, but i am confuse with the file handle
$handle_file = fopen ($find_file, "r");
while (!feof ($handle_file)){
$buffer = fgets($handle_file, 4096);
echo "$buffer<br>";
}
}
}
closedir($handle);
}
?>
this script does'nt run correctly i have an error message, "Warning: Supplied argument
is not a valid File-Handle resource in c:\apache\htdocs\fseek\readdir.php on line 11"
I confuse with the file handle, because is different with opening file like usually,
what should i do...??? does any one can help me...??
Thanx
idur
---------------------------------
Do you Yahoo!?
Yahoo! Photos - Get your photo on the big screen in Times Square
--- End Message ---