|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
$file problem...
ive got a $file and its suppose to contain the file that i want. It works fine on my PC as im using phptriad. But when i tried it on a server, it didnt work. Do i need to specify what $file is? How do i do that?
Thanx |
|
#2
|
||||
|
||||
|
um, what is $file?
[maybe you could post a little snippet of your code] |
|
#3
|
|||
|
|||
|
if($File)
{ // create a table with invisible border print "<table width=\"450\" border=\"0\">"; print "<tr>"; // prints out the name of the uploaded file print "<td width=\"410\">File Name: <strong> $File_name </strong> <p>\n </td>"; print "</tr>"; print "<tr>"; // prints the size of the file in bytes print "<td> <br>File size: <strong> $File_size bytes </strong> <p>\n </td>"; print "</tr>"; print "</table>"; print "<br>"; $strSQL = "INSERT INTO file (file_id, file_name, file_size, upload_date) VALUES ('', '$File_name', '$File_size', NOW())"; $result = mysql_query($strSQL); // copies the file information and stores it to the database if (copy($File, $result)) { print " File successfully uploaded! <p> \n"; } else { print " Unable to upload file <p> \n"; } // deletes the file if upload unsuccessful unlink ($File); } |
|
#4
|
||||
|
||||
|
Sounds like Register Globals is turned off on the server.
You could try referring to PHP Builder for an implicit solution. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > $file problem... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|