casey_00 Posted April 8, 2007 Share Posted April 8, 2007 :)hey guys im no php programmer but im trying to tell this thing to use an image. can any one see a problem with this line. cause its not working... Define('WATERMARK_TEXT', $img['../images/cross.jpg']); // margin ??? any help would be great Link to comment https://forums.phpfreaks.com/topic/46093-define-problem-probably-easy-as/ Share on other sites More sharing options...
casey_00 Posted April 8, 2007 Author Share Posted April 8, 2007 can anyone point out any probs? ??? Link to comment https://forums.phpfreaks.com/topic/46093-define-problem-probably-easy-as/#findComment-224005 Share on other sites More sharing options...
HaLo2FrEeEk Posted April 8, 2007 Share Posted April 8, 2007 Well, you might want to post a bit more of your code. Where does the array $img[] come from? when you call up values from an array, they are usually by number, unless it is an associative array. What you would want to try, maybe, is this: define('WATERMARK_TEXT', "<img src=\"../images/cross.jpg'\">", true); The true at the end makes it case-insensitive, meaning that Watermark_Text, WATERMARK_TEXT, and watermark_text will all work. Basically, to print the img tags, do this: echo watermark_text; it will print out <img src="../images/cross.jpg'"> Try that out. Link to comment https://forums.phpfreaks.com/topic/46093-define-problem-probably-easy-as/#findComment-224009 Share on other sites More sharing options...
casey_00 Posted April 8, 2007 Author Share Posted April 8, 2007 thanks man... ill give that a go... that is along the lines that i needed Link to comment https://forums.phpfreaks.com/topic/46093-define-problem-probably-easy-as/#findComment-224130 Share on other sites More sharing options...
casey_00 Posted April 8, 2007 Author Share Posted April 8, 2007 Well it keeps coming up on the image as text... i want it to pull the image as a watermark. So its working good, but instead of img src= etc coming on the image i want the cross image... this is the top part of the code. i havent defined the image apart from what i have there. is that right, or do i have to put it in elsewhere... if ( $config['watermark_snaps'] != '' ){ /* Watermark the picture */ Define('WATERMARK_TEXT_FONT', '3'); // font 1 / 2 / 3 / 4 / 5 Define('TEXT_SHADOW', $config['watermark_text_shadow']); // 1 - yes / 0 - no Define('TEXT_COLOR', $config['watermark_text_color']); // text color Define('WATERMARK_ALIGN_H', $config['watermark_position_h']); // left / right / center Define('WATERMARK_ALIGN_V', $config['watermark_position_v']); // top / bottom / center Define('WATERMARK_MARGIN', $config['watermark_margin']); // margin Define('WATERMARK_TEXT', "<img src=\"/images/cross.jpg'\">", true); // margin think im royally screwing this up... thats why im here i guess!!! any help? Link to comment https://forums.phpfreaks.com/topic/46093-define-problem-probably-easy-as/#findComment-224140 Share on other sites More sharing options...
HaLo2FrEeEk Posted April 8, 2007 Share Posted April 8, 2007 You're trying to put a watermark on a picture using define?!? Why? Use this tut, it might help http://www.sitepoint.com/article/watermark-images-php Link to comment https://forums.phpfreaks.com/topic/46093-define-problem-probably-easy-as/#findComment-224426 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.