Variable won't echo in string
I'm trying to echo the variable $theurl
inside of $image_all
but it's not working.
$theurl = OF_DIRECTORY;
$image_all = $theurl.$image_path;
This should be simple, right? It's only showing wha开发者_如何学运维t $image_path
equals, even though it will echo $theurl
if I simply do <?php echo $theurl; ?>
.
What am I missing?
Lets make a very very simple example:
define(OF_DIRECTORY, 'blabla/test/');
$image_path = 'file.php';
$theurl = OF_DIRECTORY;
$image_all = $theurl.$image_path;
echo $image_all;
Works great by the way! However, why use the $theurl at all? Why not $image_all = OF_DIRECTORY . $image_path;
. You need provide us more information or code, but as far as your specifications goes, everything should be OKAY.
精彩评论