Dear brothers. Excuse me, I am a novice. I have bound multiple domain names to the same web page. For example, if I want www.bd.com to access it, the background image should be changed to b.jpg. Otherwise, the default is the background image set before
<?php $domain?=?$_SERVER['HTTP_HOST']; if?($domain?==?'www.bd.com')?{ $backgroundImage?=?'b.jpg'; }?else?{ $backgroundImage?=?'default.jpg';?//?默認背景圖 } ?> <!DOCTYPE?html> <html> <head> <style> body?{ background-image:?url(<?php?echo?$backgroundImage;??>); } </style> </head> <body> <!--?頁面內(nèi)容?--> </body> </html>