I have two pages where I upload images to a database.

The first one is a "capture", where I insert a record to the database, and the second 
is to edit the data.

The problem: When I go to insert, the following code works flawlessly:

if ($cmdOk == "Save") {
        if (isset($imagen) && $imagen != "none")
                $data = addslashes(fread(fopen($image, "r"), filesize($image)));
                $data = "";

But, if I do in another page (the same darn snippet), it goes:

Warning: fopen("C:\WINNT\Web\wuicon1.gif", "r") - No such file or directory in 
/web/domain/adconsolutions/htdocs/conexionescolar/frmnoticiasedi.php on line 18

Warning: stat failed for C:\WINNT\Web\wuicon1.gif (errno=2 - No such file or 
directory) in /web/domain/adconsolutions/htdocs/conexionescolar/frmnoticiasedi.php on 
line 18

Warning: fread(): supplied argument is not a valid File-Handle resource in 
/web/domain/adconsolutions/htdocs/conexionescolar/frmnoticiasedi.php on line 18

Anybody knows why? It's the same vars, the same text boxes, etc. The only thing that 
changes comes after that condition...

Un gran saludo/Big regards...
   Arturo Barajas
   Sistemas PPG SJR
   +52 (427) 271-9100, ext. 448

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to