Coder
Coder

Reputation: 220

PHP Image upload issue

I upload an image from my site and it loads in a folder debatepic but by default the image is storing in not-webvisible status ,So everytime after upload i need to change the status as webvisible so that it can be viewed on my site The parent directory is set webvisible but files inside this is not webvisible by default! Details :

http://www.votefan.com/startdebate.php ( to upload image ) (need to sign up or login with username: andy password: andy123 )

the page where image can be viewed is

http://www.votefan.com/voteresult.php?debid=18 Godaddy team informed it is coding error ...

Upvotes: 0

Views: 74

Answers (1)

Ghost-Man
Ghost-Man

Reputation: 2185

After upload code in your program try changing the permission of the images. Refer below code:

<?php chmod("path_to_the_image", 0644); ?>

You can refer the php manual for chmod at http://php.net/manual/en/function.chmod.php

Upvotes: 1

Related Questions