Jump to content

[SOLVED] constant not getting read


evanct

Recommended Posts

Simple but confusing problem: I have this constant defined in config.php:

 

define('MAX_IMAGE_SIZE',350);

 

And part of this function that uses it:

 

require_once('config.php'); 
list($width,$height)=getimagesize($path);
$left_margin=(MAX_IMAGE_SIZE - $width) / 2 .'px;';

 

MAX_IMAGE_SIZE isn't recognized for some reason. it's just treated as 0. the require_once filepath is correct. MAX_IMAGE_SIZE is used successfully in other scripts. have any ideas why this might happen?

Link to comment
https://forums.phpfreaks.com/topic/161128-solved-constant-not-getting-read/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.