Parse error: parse error in/test/put_file.php on line 14???
| From: | Alex Elderson | Date: | Tue, 18 Dec 2001 09:26:17 +0000 |
| Subject: | Parse error: parse error in/test/put_file.php on line 14??? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-78048@lists.php.net to get a copy of this message | ||
Hi,
What do i wrong? I get this err:
Parse error: parse error in /test/put_file.php on line 14
--------put_file.php begin---------
<?php
if ($submit) {
include('include.php');
$pos = strrpos($file, "\");
if ($pos === FALSE) {
$pos = strrpos($file, "/");
if ($pos === FALSE) {
$pos = 0;
}
}
$name = substr($file, $pos + 1);
$applicationn = substr($file, strrpos($file, "."));
$fd = fopen($file, "r") or die("can't open the file");
$file_bin = fread($fd, filesize($file));
fclose($fd);
$file_bin = mysql_escape_string($file_bin);
$sql = "INSERT INTO files (id, name, description, file, application)
VALUES ('', '$name', '$description', '$file_bin',
'$application')";
$result = mysql_query ($sql) or die('fout');
}
?>
--------put_file.php end---------
--------include.php begin---------
<?php
$conn = mysql_connect("localhost","user","password");
mysql_select_db("test", $conn);
?>
--------include.php end---------