Heroku require_once错误

I am developing a php application locally, and all works well until I push to heroku, where the log gives me this error:

PHP Warning:  require_once(/app/src/web/../../etc/s_init.php): failed to open stream: No such file or directory in /app/src/web/index.php on line 2

This is the troublesome piece of code:

require_once(__DIR__ . '/../../etc/s_init.php');

It works locally but doesn't work when pushed to heroku. The directory looks like this:

- etc
   - s_init.php
- src
   - web
      - index.php

I have run out of ideas at this point. Why is this error occurring, and how can it be fixed?

Thanks!

The error tells you the problem:

(/app/src/web/../../etc/s_init.php)

That's not a valid path. Try this:

require_once('../../etc/s_init.php');