Answer the question
In order to leave comments, you need to log in
Analogue of file get contents for php processing?
There is such a thing: $content = file_get_contents($path);
If there is a php script in this $path, then it does not process it, but simply pulls out the request text itself, as I understand it logically, the file is the same, eprst. So here's a question, how can I fix this thing so that the php code is processed?
Answer the question
In order to leave comments, you need to log in
If I understand you correctly - you need to execute the code from the file that is in $path
Then you should use eval
$content = file_get_contents($path);
eval($content);
ini_set("allow_url_fopen","1");
include 'http://www.example.com/file.php?foo=1&bar=2';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question