Not sure if i'm asking in the right place, but I just installed apache and php (from linuxpackages.net), everything is running fine as I can tell, but my scripts I made and ran in windows no problem, in linux it's not writing to file. Do I have to set up permission somewhere? Can someone help a newb. Thanks :|
Here's an example script that I'm playing with:
Code:
<?
$redirect = $_SERVER['PHP_SELF'];
echo "ready..";
if (isset($_POST['thetxt'])) {
$da = "test.php";
touch($da);
$wr = fopen($da, "w");
fwrite($wr, $_POST['thetxt']);
fclose($wr);
echo "wrote to <a href=$da>$da</a><br>";
}
?>
<form name="write" method="post" action="<? echo $_SERVER['PHP_SELF'] ?>">
<textarea name="thetxt" rows="30" cols="50"></textarea><br>
<input type="submit" name="go" value="Go">
</form>
<?
?>
Just so you get the idea of what the problem is.