I'm having a problem.
$name = @$_post["name"]; $file = ".data"; $filename = $name.$file; $url = "/user/".$filename; $fp = fopen("$url" , "rb")
The $url isn't right. Does someone know how to fix it?
If you can help thanks.
You can try:
if (!empty($_POST["name"])) { $filename = "/user/" . $_POST["name"] . ".data"; $fp = @fopen($filename, "rb") OR die("Error: could not open " . $filename); //work with the file fclose($fp); } else { //$_POST["name"] is empty }
The problem is in $_post['name']
post must be UPPERCASE
It should be
@$_POST['name']
Try it.
yeah, I perceived that to be the problem too.
The @ error suppression isnt needed though.
Ya, u r right.