Problem uploading an image
| From: | Barajas, Arturo | Date: | Thu, 04 Jul 2002 15:33:48 +0000 |
| Subject: | Problem uploading an image | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-105459@lists.php.net to get a copy of this message | ||
Greetings.
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)));
else
$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...
TIA.
--
Un gran saludo/Big regards...
Arturo Barajas
Sistemas PPG SJR
+52 (427) 271-9100, ext. 448