savetree
-
Posts
10 -
Joined
-
Last visited
Posts posted by savetree
-
-
I did. See my edit for my new code. Its still not working
EDIT: This is what I added to the above post:
This is the error
Warning: Cannot modify header information - headers already sent by (output started at /home/savetree/public_html/avatarscript.php:1) in /home/savetree/public_html/avatarscript.php on line 2
from this code
<?php header("Content-Type: image/jpg"); $d = scandir('.'); foreach($d as $f) if(substr($f,-4)==".jpg") $fs[] = $f; readFile($fs[rand(1,count($fs))-1]); ?>
-
where do I put it? It is already in the php script is it out of the php braces?
EDIT:This is the error
Warning: Cannot modify header information - headers already sent by (output started at /home/savetree/public_html/avatarscript.php:1) in /home/savetree/public_html/avatarscript.php on line 2
from this code
<?php header("Content-Type: image/jpg"); $d = scandir('.'); foreach($d as $f) if(substr($f,-4)==".jpg") $fs[] = $f; readFile($fs[rand(1,count($fs))-1]); ?>
-
I have a php page that is supposed to load a random image from the folder it is in
<?php error_reporting(0); header("Content-Type: image/jpg"); $d = scandir('.'); foreach($d as $f) if(substr($f,-4)==".jpg") $fs[] = $f; readFile($fs[rand(1,count($fs))-1]); ?>
Why is this not working. I have checked that there are valid images, and i have seen this exact same script work on a personal server of the person who made it
my domain name is savetree.heliohost.org
this php is called avatarscript.php and is in the public_html directory
-
Mine is now up just took about 12 hours extra
-
Is it 24 or 48 hours till I can access my domain with the new name? firefox is telling me server not found still and its been 24 hours
-
I live in the Southern US
-
I'll gladly take it now
I haven't been with you long enough to know much though
-
It must have been the bad domain name causing my problems because I can now access my files.
Thank you for pointing out my error
-
I went to the domain script and changed the domain to savetree.heliohost.org
-
I made a domain then 3 days later changed it. Now I can not access any of my files when I sign in to cpanel. It says access denied. I had also created a folder for a django project but now it has disapeared and a file in its place that is 0 bytes and I can't view it because if the access denied thing
domain name: savetree.heliohost.net
username: savetree
PHP image page not working
in Website Management and Coding
Posted
Thank you it now works with this code