You can also open a socket and put the files up via ftp. I use this 
method frequently when I cannot move the uploaded files.

use the fopen("ftp://user:[EMAIL PROTECTED]/path/to/images","w";) 
command to place the files.

This doesn't work so well if the file already exists, so you have to 
delete it first using the socket connection.

Like so ... (from user comments at

echo fgets($ftp,255);
fputs($ftp,"USER your_username\r\n");
echo fgets($ftp,255);
fputs($ftp,"PASS your_password\r\n");
echo fgets($ftp,255);
fputs($ftp,"DELE file_to_delete.txt\r\n");
echo fgets($ftp,255);
echo fgets($ftp,255);


PS Sorry about missing the point of your question the first time around ...

>I have written a simple image uploading system to go along with a simple
>database.  This will be a part of a publiclay accessable search engine for a
>jewelry companie's web site.  Almost every entry has a corresponding image.
>But that was the easy part...  The problem now is that I need to display the
>images next to the corresponding info on the same page.
>I do not know much about UNIX permissions but I am strongly advised to keep
>the permission settings on the public-html directory set to 0755 at the very
>least.  Since the PHP script inhereits user permissions (and not the Owner's
>permission)  this means that I can not upload the files to the Public-html
>directory where I could easily grab them with a URL.  The only place I have
>access is outside the public html directory.  Of couse I can open any number
>of images I like and read them to the browser screen... but they can not
>mingle with HTML becuase I have to set the header("Content-type:
>image/jpeg") in order to display the image in the first place.  ARRGGH!
>It is forcing me to use frames or a floating window to display the images..
>which is absoutely totaly unacceptable.  Aside from being a hack solution
>there is no way I can align the images with the corresponding database info.
>And inline frames are not supported by all browsers.
>I am being blocked on all ends and I need a solution fast.  Any help will be
>**GREATLY** appreciated.
>-Kevin Stone
>PHP General Mailing List (
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

Jim Musil
Multimedia Programmer

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to