Welcome Guest, Not a member yet? Register   Sign In
Storing image locations using constants.
#4

[eluser]John_Betong_002[/eluser]
Try this:

./application/config/constants.php
Code:
$base_url= $_SERVER['SERVER_NAME'];
define
(
  'DB_IMG',
  "<img src='http://" .$base_url .'  class='db_img' alt='#' />"
);
&nbsp;
You could also take a look at creating an additional config.php file.
&nbsp;
&nbsp;&nbsp;
&nbsp;

edit: problem due to square brackets, code got truncated so rewrote, now displays OK.


Messages In This Thread
Storing image locations using constants. - by El Forum - 08-04-2011, 03:21 PM
Storing image locations using constants. - by El Forum - 08-04-2011, 10:50 PM
Storing image locations using constants. - by El Forum - 08-09-2011, 02:46 PM
Storing image locations using constants. - by El Forum - 08-09-2011, 07:57 PM
Storing image locations using constants. - by El Forum - 08-09-2011, 08:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB