Jump to content

Recommended Posts

[!--quoteo(post=381259:date=Jun 7 2006, 07:58 PM:name=me1000)--][div class=\'quotetop\']QUOTE(me1000 @ Jun 7 2006, 07:58 PM) [snapback]381259[/snapback][/div][div class=\'quotemain\'][!--quotec--]
ok i have edited the code to replace $sesson->username.
now i still cant upload but something did change

Folder size: 37546 bytes

it used to say zero
Usage: still says zero though.
[/quote]
CHMOD usage.txt to at least 666.
Link to comment
https://forums.phpfreaks.com/topic/11440-image-hosting/page/2/#findComment-43064
Share on other sites

[!--quoteo(post=381400:date=Jun 8 2006, 07:17 AM:name=me1000)--][div class=\'quotetop\']QUOTE(me1000 @ Jun 8 2006, 07:17 AM) [snapback]381400[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[b]edit:[/b] sorry I cant post the code i need to show you for some reason! im getitng a forbiden message!
[/quote]
Probaly the over sensitive security system is blocking your POST data.
Did you try to post f.open, f.write, f.close or something like this?
Link to comment
https://forums.phpfreaks.com/topic/11440-image-hosting/page/2/#findComment-43196
Share on other sites

[!--quoteo(post=381418:date=Jun 8 2006, 07:49 AM:name=me1000)--][div class=\'quotetop\']QUOTE(me1000 @ Jun 8 2006, 07:49 AM) [snapback]381418[/snapback][/div][div class=\'quotemain\'][!--quotec--]
no i was trying to post the upload script that I had that was working without the restrictions.

would you mind if i PMed it to you?
[/quote]
Not at all [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]
But I don't think it's going to work anyway. Try to host the code somewhere and post the link.
Link to comment
https://forums.phpfreaks.com/topic/11440-image-hosting/page/2/#findComment-43212
Share on other sites

I got it.

OK, I check your code. There are some functions and variables that I don't know how they were set or what they are. They must come from an included file, but whatever.

It also appears that you are not using move_uploaded_file to move the uploads. Try to use it, because it's easier IMO. Also, first things first. Try to use the code I posted and change "$session->username" to "test" and create a directory named "test" with a file "usage.txt" chmoded 666.

Then you can see if that works. Also, I don't know what is your problem right now...
Link to comment
https://forums.phpfreaks.com/topic/11440-image-hosting/page/2/#findComment-43224
Share on other sites

ok i tried to merge the code and im not having much luck!

maybe you can find something, when i try to uplaod a file it says,
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Current usage: 0 bytes. Error Uploading File[/quote]

[a href=\"http://www.trekcore.com/staff/me1000/upload.txt\" target=\"_blank\"]link to code[/a]

there is the link to the code im using.

ill continue to work on it.


[b]edit:[/b] ok i figured out why it wasnt uploading. it was because it was going to the wrong folder.

the upload part works, but its not writing the correct value in the file usage.txt it is writing 0 all the time
Link to comment
https://forums.phpfreaks.com/topic/11440-image-hosting/page/2/#findComment-43352
Share on other sites

me100, why don't you try using a PEAR package for this? No need to beat your head against this problem and that way you can focus on getting the sessions to work and just implement the package after they pass. I use this package for my file uploads, I can try to answer questions if you have 'em.

[a href=\"http://pear.php.net/package/HTTP_Upload\" target=\"_blank\"]http://pear.php.net/package/HTTP_Upload[/a]

I also think that it is more secure to use a package that has been touched by many hands than to try to make something like this on your own, unless you are very experienced with HTTP and security issues.
Link to comment
https://forums.phpfreaks.com/topic/11440-image-hosting/page/2/#findComment-43362
Share on other sites

Thanks for the link but I would like to do this myslef, without having to use some one else's script.

the session works fine.

here is the link to it now.
[a href=\"http://www.trekcore.com/staff/me1000/upload.txt\" target=\"_blank\"]link to code[/a]

can you please tell me why it is not adding up the file size's and writing them to the usage.txt file???
Link to comment
https://forums.phpfreaks.com/topic/11440-image-hosting/page/2/#findComment-43397
Share on other sites

first off, I would like to thank everyone that has helped me here.

everything works like a charm now!

except for some reason the following line no longer works!
[code]$pext = getFileExtension($imgfile_name);[/code]

can you tell me why?

this is the error im getting,
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Fatal error: Call to undefined function: getfileextension() in /htdocs/www/special/tutorials/uploads/upload.php on line 91[/quote]
Link to comment
https://forums.phpfreaks.com/topic/11440-image-hosting/page/2/#findComment-43410
Share on other sites

[!--quoteo(post=381625:date=Jun 9 2006, 06:34 AM:name=me1000)--][div class=\'quotetop\']QUOTE(me1000 @ Jun 9 2006, 06:34 AM) [snapback]381625[/snapback][/div][div class=\'quotemain\'][!--quotec--]
ok i moved where it defines the function, IDK why it didnt work, i havent moved any of that particular code around at all!

andyway it works now.
thank you for all your help!!! :)
[/quote]

Hi,

I am working on something simular and I would like to have the image broken up into several small pieces (say 9 equal sized pieces, like a tic-tac-toe board) and renamed something like image1-1.jpg, image1-2.jpg, etc...

Is there a simple way of doing this, or do I need to use imagecopy 9 times?

Thanks!

Joe
Link to comment
https://forums.phpfreaks.com/topic/11440-image-hosting/page/2/#findComment-43555
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.