Sunday, 15 March 2015

embed - PHP code either is commented out or Produces Internal Server Error 500 -



embed - PHP code either is commented out or Produces Internal Server Error 500 -

<div class="thumb_container centered"> <?php foreach (glob("../images/*.{jpg,png}") $filename) { echo '<img src="' . $filename . '">'; } ?> </div>

this snippet not work embedded within of html document. if save file .php extension, errors out , gives internal server error 500. if save .html, script commented out , prints ';}?> within div. have set permissions 755, still no go.

how have script run?

there maybe problem permissions on ../images/ and/or it's files. seek set permissions readable webserver user.

the file extension .php of course of study right 1 files parsed php.

you can check error log, located in /var/log/.

php embed

No comments:

Post a Comment