The problem:
I'd like to build – with PHP – a background-image url
on a server (Apache) (url itself or a full directory name).
I'd like to use a portable mechanism, I mean a PHP script
should work in Windows, Unix and Linux. In Windows I use:
...
<style type="text/css">
..a_class
{
<?php
$S_1 = getcwd()."/images/image_1.jpg"; //BACKGROUND PICTURE
echo "background-image: url($S_1);";
?>
....
It works fine but it doesn't work in FreeBSD, for example.
Thank you in advance.
Marek Kotowski
Warsaw
I'd like to build – with PHP – a background-image url
on a server (Apache) (url itself or a full directory name).
I'd like to use a portable mechanism, I mean a PHP script
should work in Windows, Unix and Linux. In Windows I use:
...
<style type="text/css">
..a_class
{
<?php
$S_1 = getcwd()."/images/image_1.jpg"; //BACKGROUND PICTURE
echo "background-image: url($S_1);";
?>
....
It works fine but it doesn't work in FreeBSD, for example.
Thank you in advance.
Marek Kotowski
Warsaw
Comment