I advise you use:

```global $amp_conf;
$amp_conf['AMPWEBROOT']```

Instead of dirname since if it's a development environment dirname will usually be in usr/src