|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problems as a webpage
My script runs fine when you run it from the command line and redirect the output to a html file, but if you run it straight through the web server, then the output gets corrupted. I'd imagine because the output file gets too large, but do I need to work around this or not?
|
|
#2
|
|||
|
|||
|
RE: Problems as a webpage
Putting header("Content-Type: image/png"); at the top of your script is a good start.
Also make sure you're running the same version of PHP on the command-line and on the web server, and make sure they're compiled with the same options. |
|
#3
|
|||
|
|||
|
RE: Problems as a webpage
How "corrupted"? what do you expect it to show and what does it end up showing?
|
|
#4
|
|||
|
|||
|
RE: Problems as a webpage
Nothing in the rules state that the script must be runnable from a web browser...
|
|
#5
|
|||
|
|||
|
RE: Problems as a webpage
So if my script saves the image as a .png file and you run it command line style, then open the maze.png (or something) manually to see results, it won't have receive any penalty? ie. you'll only judge on the final "maze" product(whether it be html, image, whatever), not the loading screen(s), generator method, etc. etc.?
|
|
#6
|
|||
|
|||
|
RE: Problems as a webpage
Nothing in the rules state that the script must be runnable from a web browser...
|
|
#7
|
|||
|
|||
|
RE: Problems as a webpage
heh, no kidding.. ;)
|
|
#8
|
|||
|
|||
|
RE: Problems as a webpage
well, my output isn't a png image.. so that isn't the reason. But, fyi, the current gd library does have size restrictions somewhere in it. It'll truncate loading from a file past a certain byte count. But anyways, no my HTML gets borked.. it becomes random bytes in the middle of it. I think it relates to the absurb size mize I was using.. the HTML output is 1.5Mb :p
|
|
#9
|
|||
|
|||
|
RE: Problems as a webpage
hehe, geez, 1.5mb is prolly just ever so slightly big for a browser to handle
|
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > Problems as a webpage |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|