# Current php-file in extension

- Thread: https://externals.io/message/3450
- Original archive: https://news-web.php.net/php.internals/3450
- Started by Sam Baum on 2003-07-16T19:55:50+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #3450 — Sam Baum — 2003-07-16T19:55:50+00:00

URL: https://externals.io/message/3450#3450

Hi there,

how can i get the current php-file, not the filename in PHP_SELF, that was
requested, but that file that actually has the written code that called the
PHP_FUNCTION of my extension.

Background is, that i syslog `mail()`, so i can track down misuse on my
server.


bg

Sam

---

## #3458 — Sam Baum — 2003-07-17T10:24:14+00:00

URL: https://externals.io/message/3450#3458 · In reply to: #3450

Hi,

am Wednesday 16 July 2003 21:55 schrieb Sam Baum:

> how can i get the current php-file, not the filename in PHP_SELF, that was
> requested, but that file that actually has the written code that called
> the PHP_FUNCTION of my extension.

got it myself, its zend_get_executed_filename(TSRMLS_C), if any other newbie
should ever search for that.


bg

Sam
