I want to do this, but it gives error 🙁 for better understanding my problem I’m giving an example:
<?php
include 'script.php?text=hiii';
?>
content of the script.php
<?php
echo $_GET['text'];
?>
So, how can i pass an argument while including the script page?
You could set
$_GET['text']before including the file:But this obviously won’t affect other variables like
$_SERVER['REQUEST_URI'],$_SERVER['QUERY_STRING']etc.