D
D
Danya  2021-07-08 02:04:26
PHP
Danya  , 2021-07-08 02:04:26

CNC from a folder how?

Hey! There is a site:

spoiler
site.com
    photo
        index.php
    index.html

index.php code:
<?php
$result = $_SERVER['REQUEST_URI'];

echo $result;
?>


When I go to site.com/photo/test I get Error 404 .
How can I fix this so that when I go to site.com/photo/test I get test ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2021-07-08
@MrBrainop

and why should this work? there is no such way; neither real nor virtual.
I already answered you earlier: smoke the topic of CNC.
and even better, its implementation based on a single entry point and routing.
https://github.com/nikic/FastRoute as an example.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question