NYCPHP Meetup

NYPHP.org

regarding image

Tracy tech_learner at yahoo.com
Thu Jan 16 07:31:06 EST 2003


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
>
>
> 
>
>



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



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


---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030116/1ce4ca7c/attachment.html>


More information about the talk mailing list