View previous topic :: View next topic |
Author |
Message |
BareKnuckles -
Joined: 01 Feb 2004 Posts: 6
|
Posted: Thu Mar 25, 2004 11:03 pm Post subject: I need an experts advice |
|
|
I am new to php and I could use some advice.
I'm running php 4.3.4 and abyss server on a win98 machine.
php is installed correctly as I have tested it using phpinfo().
I get this error when executing a certain script that I wrote...
Warning: fopen(undeliverable email.txt): failed to open stream: No such file or directory in C:\Program Files\Abyss Web Server\htdocs\php\sendmixed.php on line 6
Warning: fread(): supplied argument is not a valid stream resource in C:\Program Files\Abyss Web Server\htdocs\php\sendmixed.php on line 7
What needs to be done to fix this?
just so you know:
register_globals=on
safemode=off
thanks! :? |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Fri Mar 26, 2004 2:18 am Post subject: |
|
|
First of all, what is the script supposed to do? It looks like a formmail script to me. If it is a formmail, then I can almost bet you that you are trying to use "sendmail;" when in fact, Windows has no sendmail.
If this is the issue, tell me, and I can help you out with it. _________________ Bienvenidos! |
|
Back to top |
 |
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Mar 26, 2004 2:04 pm Post subject: Re: I need an experts advice |
|
|
BareKnuckles,
The error means that there is a file creation/reading error. Can you give us the download URL of the script so that we can test it? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
j_browne -
Joined: 26 Mar 2004 Posts: 13
|
Posted: Fri Mar 26, 2004 4:23 pm Post subject: this works for me... |
|
|
I used forward slash and the file is relative to htdocs (htdocs/texts/text1.txt).
I seem to remember also getting the problem when trying to open from C:\Program Files\... but can't think why I would want to do that now.
Try setting up the following test using a new file with a few lines in it, you need to set up the path/file as above:
<?php
//--- open the file:
$filename="texts/text1.txt";
if (!($f=fopen("$filename","r")))
exit("Unable to open file: $filename");
else
echo "<br>" . "File opened: $filename";
echo "<br>" . "Contents of file: $filename" . "<br>";
//--- display contents of file line-by-line:
while (!feof($f))
{
$x=fgetc($f);
echo $x;
}
fclose($f);
?> |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Sat Mar 27, 2004 1:34 am Post subject: |
|
|
But I would still like to know exactly what script you are using (and what is its purpose). _________________ Bienvenidos! |
|
Back to top |
 |
 |
|