Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
5 votes
2 answers
130 views

Assigning several variables from request URL using regexes

I refactored some of my code: Summary: This implementation works with PSGI/Plack. It gets the URL from $env->{PATH_INFO} and assigns a different variable ...
The nothing's user avatar
-2 votes
2 answers
2k views

Extracting parameters from request URL path components using regexes

The code is not efficient, let's say the url matched in the first regex case but I'm still evaluating second regex for the second case while knowing it's mutually exclusive and only one of them will ...
Developer11's user avatar
1 vote
1 answer
218 views

Serve folder content using PHP route (SSI) (dynamic includes)

I have just written a PHP router, but I have some security concerns about this function. I am trying to serve all the content of a folder using this function. I am trying to prevent harmful URLs. <...
Benjaco's user avatar
  • 141
4 votes
1 answer
1k views

PHP routing system

I made a routing system for PHP inspired by Symfony's router composed of a few classes. First I am using Symfony's HTTP Foundations component. Then, I am emulating the classes in the routing component ...
Viktorija Spasenovska's user avatar
5 votes
3 answers
115 views

UrlRouter which uses regular expressions to find out what to do

I have created UrlRouter. It should call appropriate controllers methods with extracted values as a parameters. It works fine, but my boss told me that I should ...
Iaroslav Karandashev's user avatar