Hello,
Can anyone help me with a php question?
I have the code
<?php echo stash::get('profilepic') ?>where
echo stash::get('profilepic')calls a saved variable ie bob to make bob.jpg, but I cant figure out how to put php into other php.
I want to add to the code below were it says HERE.
<?php
$filename = 'HERE.jpg';
$result = file_put_contents('/var/www/virtual/mydomai.com/images/profile/'.$filename, file_get_contents('php://input') );
if (!$result) {
print "ERROR: Failed to write data to $filename, check permissions\n";
exit();
}
$url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']) . '/' . $filename;
print "$url\n";
?>Any ideas?
Thanks!