NYCPHP Meetup

NYPHP.org

[nycphp-talk] regarding image

CHUN-YIU LAM chun_lam at hotmail.com
Thu Jan 16 21:21:54 EST 2003


Read in the page that contain the path.  Strip everything around it. ;-)






----Original Message Follows----
From: Tracy <tech_learner at yahoo.com>
Reply-To: talk at nyphp.org
To: NYPHP Talk <talk at nyphp.org>
Subject: [nycphp-talk] regarding image
Date: Thu, 16 Jan 2003 07:31:14 -0500
Received: from mc4-f19.law16.hotmail.com ([65.54.237.154]) by 
mc4-s8.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Thu, 16 Jan 
2003 04:40:18 -0800
Received: from parsec.nyphp.org ([66.250.131.26]) by 
mc4-f19.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Thu, 16 Jan 
2003 04:40:17 -0800
Received: from nyphp.org (parsec.nyphp.org [66.250.131.26])by 
parsec.nyphp.org (8.12.6/8.12.6) with ESMTP id h0GCVEps047383;Thu, 16 Jan 
2003 07:31:15 -0500 (EST)(envelope-from listmaster at nyphp.org)
Message-Id: <200301161231.h0GCVEps047383 at parsec.nyphp.org>
X-Paralist-Archived: <http://nyphp.org/list/paralist_archive.php?L_mid=2337>
X-List-Software: Paralist 0.6
List-ID: <nyphptalk.nyphp.org>
List-Owner: <mailto:listmaster at nyphp.org>
List-Archive: <http://nyphp.org/list/paralist_archive.php?L_lid=1>
List-Subscribe: <http://nyphp.org/list/>
List-Unsubscribe: <http://nyphp.org/list/>
Organization: New York PHP
X-Mailer: Paramail 0.5
Return-Path: listmaster at nyphp.org
X-OriginalArrivalTime: 16 Jan 2003 12:40:17.0898 (UTC) 
FILETIME=[6CC054A0:01C2BD5C]

HI,
I cant understand this:
in a script that is suposed to upload image, i have,
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
echo $data;
for this i get the following 'echoed':
GIF89a¾X‘\\0\\0Ê¢y`üá!ù\\0\\0\\0\\0\\0,\\0\\0\\0\\0¾X\\0ÿœ©Ëí£œ´Ú‹³Þ¼û†âH–扦êʶî 
ÇòL×öçúÎ÷þ ‡Ä¢ñˆL*—̦ó J§ÔªõŠÍj·Ü®÷ ‹Çä²ùŒN«×ì¶û 
ËçôºýŽÏë÷ü¾ÿ,(8HXhxˆ˜¨¸ÈØèø)9IYiy‰™©¹¨ð
why is it so?
is there some way where i can save the path of the image in the mysql 
database? i mean, i upload a pict from the desktop and have the path to the 
directory where i want to save the image. is there a way where i can have 
the field in the mysql table as :
image_path
-----------
"the upload dir path i have specified " + "the image name"
so that i can use this as a link to display the image.
if there is a better way to achieve this, plz help me with it.
Thanks
Tracy
  Phil Powell <soazine at erols.com> wrote:Which is what happened until I put 
the vars into a session variable, then
all was well! :)

Thanx
Phil
----- Original Message -----
From: "Analysis & Solutions"
To: "NYPHP Talk"
Sent: Thursday, January 16, 2003 2:07 AM
Subject: Re: [nycphp-talk] Problems with require and variables


 > On Wed, Jan 15, 2003 at 11:35:27PM -0500, Phil Powell wrote:
 > >
 > > However, when display.php finishes being "required", I lose all of my
 > > variables that I need for view.php. How do I retain them?? How can I
 > > ensure that these variables in display.php will also exist in view.php?
 >
 > Once it's required, everything that's happened is still there. It's as if
 > you had one big file rather than multiple smaller files.
 >
 > Chances are you are trying to use those variables in functions in which
 > you didn't global the array.
 >
 > --Dan
 >
 > --
 > PHP classes that make web design easier
 > SqlSolution.info | LayoutSolution.info | FormSolution.info
 > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
 > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
 >
 >
 >
 >
 >







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Coming together is a beginning...
    keeping together is progress...
       working together is success !!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--- Unsubscribe at http://nyphp.org/list/ ---


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus




More information about the talk mailing list