title: How to set the DOCUMENT_ROOT and site root in my local PHP dev setup?
body: <p>I'm doing a job for a guy with a site online. It's an alien site to me, and I'm slowly working through the strange code. I have MAMP locally and my <a href="http://localhost/" rel="noreferrer">http://localhost/</a> has many client folders coming off from that. Inside this code there is a lot of $_SERVER['document_root'] commands and references like <img src="/images/shopping.gif"> which are just getting lost on my local PHP dev area.</p>
  
  <p>How can I easily set the document_root reference to what it should be (just locally though, don't really want to mess with the site files, as I'll need to upload them again and don't want to break live site! And is there a way of indirect setting where PHP thinks the root of the site is so the image's src references "/images/..." will show up properly... My local PHP dev URL for this site is: <a href="http://localhost:8888/_CLIENTS/clientsite/www/" rel="noreferrer">http://localhost:8888/_CLIENTS/clientsite/www/</a> ...but in the code the '/' at the beginning of '/images/...' is referencing <a href="http://localhost:8888/" rel="noreferrer">http://localhost:8888/</a> ??</p>
  
  <p>Thank you.</p>