This is the code that I am currently using, but it's not working:
$param=$_GET['param'];
echo $param;
$query =file_get_contents($param);
This is the code that I am currently using, but it's not working:
$param=$_GET['param'];
echo $param;
$query =file_get_contents($param);
According to your comment
Actually I want to get as $query =file_get_contents("D:\MyScript.sql"); Here I want to pass this location from c#
you should just read the content from the file with some kind of filereader and then execute the file with a instance of your db. I'm not pretty sure why you wrote "execute the script by php" and your comment says "pass the location from c#" but the base solution should be the same.