Skip to content

Instantly share code, notes, and snippets.

@thiagomgo
Created February 10, 2020 13:16
Show Gist options
  • Save thiagomgo/482ec939131bb78900a8eee43f467fa8 to your computer and use it in GitHub Desktop.
Save thiagomgo/482ec939131bb78900a8eee43f467fa8 to your computer and use it in GitHub Desktop.
Check which user is running under web server
<?
echo "I am running as user=";
system("whoami");
echo "<P>I can write here= ";
system("pwd");
$fname="write_test.txt";
if (file_exists($fname)) {
echo "<P> I found file $fname and will delete it";
unlink($fname);
echo "...Done";
}
echo "<P>I'm writing new file $fname";
system ("touch $fname");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment