|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Hi
Im following the article: URL which basically enables uploads of binary data whether its jpeg or gifs, etc and get a problem when running the script to insert data in the tables (the file grabfiles.php). Warning: fopen("", "r") - No such file or directory in c:\apache\htdocs\test\grabfile.php on line 30 Warning: fread(): supplied argument is not a valid File-Handle resource in c:\apache\htdocs\test\grabfile.php on line 31 Basically, line 30 and 31 are : Warning: fopen("", "r") - No such file or directory in c:\apache\htdocs\test\grabfile.php on line 28 Warning: fread(): supplied argument is not a valid File-Handle resource in c:\apache\htdocs\test\grabfile.php on line 29 I commented out the following if statement because it would pull the error messages or the condition. if(empty($strDesc) || $fileUpload == "none") die("You must enter both a description and file"); Since this is a new installation of PHP 4 i get the impression it does not like the variables when referred to as $myVariable, but does understand: $HTTP_POST_VARS["myVariable"]; I have tested this from a a html form, when the user click submit, the following does work: echo $HTTP_POST_VARS["strDesc"]; but this does NOT work: echo ("$strDesc"); Can anyone help, i get the impression that if the issue with the variables works, then the whole thing works. Sunit |
|
#2
|
|||
|
|||
|
ALL FIXED
Had to make changes to the php.ini file.
Change the register_global varaiable to On from off. Still having problems with script, i can now put the files in the database ... it think. But cant get the file to show when retrieving it from the database. im sure it will eventually come to me. Sunit |
|
#3
|
|||
|
|||
|
I was gonna say about the register globals eheh
when your trying to display the file, what errors are you getting? |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Blobbing Data With PHP and MySQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|