George Reith George Reith - 1 year ago 199
PHP Question

PHP: remove filename from path

Say I have an path: images/alphabet/abc/23345.jpg

How do I remove the file at the end from the path? So I end up with: images/aphabet/abc/

Answer Source

You want dirname()

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download