Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How_to_display_JPG_files_that_are_stored_on_the_user

 
Goto page Previous  1, 2
   Database Help (Home) -> PHP SQL RSS
Next:  Work in PHP/Mysql  
Author Message
Hiker123

External


Since: Jun 08, 2008
Posts: 1



(Msg. 16) Posted: Sun Jun 08, 2008 12:34 pm
Post subject: Re:_How_to_display_JPG_files_that_are_stored_on_the_ [Login to view extended thread Info.]
Archived from groups: comp>lang>php, others (more info?)

You've had a lot of replies saying that you can not
do this in PHP

While the PHP Script can't do it alone,
you can embed client side code to meet the need.
Several users suggested Java.

If you are open to an ActiveX solution ( requires browser
to be IE on Windows system ) then this becomses easy.
Our MetaDraw control can display local ( or remote)
JPGs ( or other image formats ) within a scrollable,
zoomable client side window. Also in Active X it
is easy to handle the directory listing and file
deletions ( if allowed by the user ).

If you are interested, contat me at
Jeff AT Bennet-Tec.com

============================

On May 4, 9:28 am, PHPBABY3 wrote:
> I would like to do as follows:
>
> 1. The user identifies any directory on his computer.
> 2. I go through that directory and find all JPG files in it.
> 3. I display those JPG files.
>
> This is what I know:
>
> 1: The input type “file” would let them choose any file in that
> directory and send me the complete pathname (the drive, list of
> directories leading to it and file name.)  I then ignore the file name
> at the end and I have the directory.
>
> Is there a way for them to browse to a directory and choose just a
> directory instead of a random file within that directory?  This is
> minor, but still I am only asking for the drive and directories part
> of the pathname.
>
> 2: I can get a list of the file names in that directory using the
> opendir and readdir functions.
>
> 3: I go through the list of file names and want to use html IMG to
> display the JPG file. This is the real problem.  How can I specify
> that the SRC is an arbitrary file on their computer?  Using the
> pathname (drive, directories and file name) doesn’t work.
>
> I can get the contents of the file using the fopen and fread
> functions.  But how do I specify the contents as the html SRC?  Do I
> have to save the file contents to the server first?  Then would I need
> to assign it a file name e.g. “A1”, “A2” etc?  And then delete it
> after displaying it?  And if there is a problem during that process
> and it doesn’t run to completion, I have to periodically delete these
> “A1” etc. file names that will not be deleted by the process that
> created them.  How do I tell if it is a file that is currently being
> displayed and to not delete it?
>
> Thanks,
>
> P -

 >> Stay informed about: How_to_display_JPG_files_that_are_stored_on_the_user 
Back to top
Login to vote
Gordon

External


Since: Jan 13, 2008
Posts: 120



(Msg. 17) Posted: Mon Jun 09, 2008 2:07 am
Post subject: Re: How to display JPG files that are stored on the user's computer? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jun 7, 3:37 pm, PHPBABY3 wrote:
> On May 5, 4:17 pm, "Paul Lautman" wrote:
>
>
>
> > PHPBABY3 wrote:
> > > On May 4, 10:46 am, "J.O. Aho" wrote:
> > >> Jerry Stuckle wrote:
> > >> > J.O. Aho wrote:
> > >> >> PHPBABY3 wrote:
> > >> >>> 2: I can get a list of the file names in that directory using the
> > >> >>> opendir and readdir functions.
> > >> >> No you can't, those will only work on the server, not on the
> > >> >> client side, if you want to do something on the client side, then
> > >> >> you use a client side scripting language like javascript.
> > >> > Javascript won't do it, either. Security restrictions will prevent
> > >> > it.
>
> > >> You are right, must been thinking of trusted java applet that can get
> > >> some local file system access, even so, I don't believe it would be a
> > >> good solution.
>
> > >> --
>
> > >> //Aho
>
> > > Can anyone give me a straight answer as to how I can do what I
> > > describe? I could even pay money for an answer.
>
> > > P -
>
> > You have had lots of straight answers. I tell you again, what you say you
> > know is all wrong. You cannot do it. Period!
>
> Some people say I can. PHP can invoke other languages.
>
> - Hide quoted text -
>
>
>
> > - Show quoted text -

Some people are wrong.

 >> Stay informed about: How_to_display_JPG_files_that_are_stored_on_the_user 
Back to top
Login to vote
GuangXiN

External


Since: Jun 09, 2008
Posts: 6



(Msg. 18) Posted: Mon Jun 09, 2008 12:13 pm
Post subject: Re: How to display JPG files that are stored on the user's computer? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

think about other client side techs, such as vbscript and activex, this
may not be able to work with firefox and other non-ie browsers.
 >> Stay informed about: How_to_display_JPG_files_that_are_stored_on_the_user 
Back to top
Login to vote
Jerry Stuckle

External


Since: Aug 11, 2004
Posts: 3779



(Msg. 19) Posted: Mon Jun 09, 2008 12:13 pm
Post subject: Re: How to display JPG files that are stored on the user's computer? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

GuangXiN wrote:
> think about other client side techs, such as vbscript and activex, this
> may not be able to work with firefox and other non-ie browsers.
>

And even if you use them, the user has to give permission for the script
to access his/her disk - which no intelligent user will do. And it
won't work on non Windoze systems.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex.RemoveThis@attglobal.net
==================
 >> Stay informed about: How_to_display_JPG_files_that_are_stored_on_the_user 
Back to top
Login to vote
GuangXiN

External


Since: Jun 09, 2008
Posts: 6



(Msg. 20) Posted: Mon Jun 09, 2008 7:10 pm
Post subject: Re: How to display JPG files that are stored on the user's computer? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Yes, it's user's computer after all. Web developers have no rights to do
anything without permition
 >> Stay informed about: How_to_display_JPG_files_that_are_stored_on_the_user 
Back to top
Login to vote
the Big H

External


Since: Oct 21, 2009
Posts: 3



(Msg. 21) Posted: Wed Oct 21, 2009 5:51 am
Post subject: Re:_How_to_display_JPG_files_that [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

http://thedevnet.com/php/classes/multiple-file-uploading-with-php/

What if you just allow him to mass select and mass upload at once the jpgs?

He'd need to have flash for this to work tho. But seriously the ability
to select all the images at once and just send them to the server would
work.

perhaps you could do something with file://
?

---------------------
The Developer Network
PHP Classes and Snippets
http://thedevnet.com
 >> Stay informed about: How_to_display_JPG_files_that_are_stored_on_the_user 
Back to top
Login to vote
Gregor Kofler

External


Since: Oct 21, 2009
Posts: 4



(Msg. 22) Posted: Wed Oct 21, 2009 9:25 am
Post subject: Re:_How_to_display_JPG_files_that [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

the Big H meinte:
> http://thedevnet.com/php/classes/multiple-file-uploading-with-php/
>
> What if you just allow him to mass select and mass upload at once the jpgs?
>
> He'd need to have flash for this to work tho. But seriously the ability
> to select all the images at once and just send them to the server would
> work.
>
> perhaps you could do something with file://
> ?

No, you can't.

Gregor



--
http://www.gregorkofler.com
 >> Stay informed about: How_to_display_JPG_files_that_are_stored_on_the_user 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
PHPtriad v2.2.1 removal - When I fist started using apache/php/mysql I used phptriad [a wonderful piece of kit] to get me up and running. I've used this ever since. I'm think inow of 'upgrading' to laters versions of all three applications, and have found various tutorials/Ho...

MySQL regular expression to match a imploded item - Hello I need to use MySQL's REGEXP (POSIX compliant) to search registries where one field is an imploded set of integer values separated with pipes "|". I need to match one of these imploded values directly on a sql select. $sql = "SELECT...

Weird mysql_connect problem - Hello. My mysql_connect just started to give me following error today, Fatal error: Call to undefined function: mysql_connect() in ..../database_functions/db_functions.inc.php on line 11. So it seems that my php no longer finds php-mysql module...

MySQL - question about displaying data - I am working an some pages that have database content on them. I'm sorry that I don't have any versions of it online yet, but it isn't hard to explain. The site lists restaurants with contact information. All of the information is kept in a MySQL..

How can i Optimize sql Query ? - Hi, I'd like to optimize this query: Code: SELECT * FROM `links` WHERE active = "1" AND mainweight != 0 ORDER BY Rand()*(1/mainweight) LIMIT 5 I have a database of links wich has 3 000 rows. I'd like to select weighted random links from ...
   Database Help (Home) -> PHP SQL All times are: Pacific Time (US & Canada)
Goto page Previous  1, 2
Page 2 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]