Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
11 votes
4 answers
20k views

what does fileURLToPath(import.meta.url) do?

Okay, so I was following a MERN stack tutorial and the tutor wrote out some lines of code but didn't really explain them well. this is the code: const path = require("path"); const { ...
gerard's user avatar
  • 491
2 votes
4 answers
12k views

Get URL of the current file with PHP

I have a PHP Class written for use in WordPress themes or plugins that loads some JS and CSS using enqueue_script and enqueue_style when the Class is initialized. I need to dynamically get the URL (...
Darren Cooney's user avatar
-1 votes
2 answers
95 views

Get prefix substring from the parent directory of a URL string

http://www.webpage.ee/xxx-galerii/event-02-02-13 How can I get "xxx" part out of that URL using PHP? There is always "ee/" on the left side and "-galerii" on the right ...
kristjanzzz's user avatar