CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 PHP Upload problem

Print topic Send  topic

Author Message
andreasa

Posts: 5
Posted: 09/29/2008, 2:06 AM

Hi,
My environment is Windows Vista, Mysql and PHP.
I have placed in my page a record form for show some field and I added two textbox type file for allow the users to upload content on server file system (no DB features).
When I click on the submit button the form is sent to the same page (form page) where in the On Initialize view I wrote the code for retrieve the value of the PHP system variable $_FILE.
The problem is that the variable is always empty.
I was confused about the problem so I create an external example; I created by hand a simple form in CodeCharge HTML view and I sent it to a test page that show the array $_FILE.
I test it and it works perfectly if I use my “hand form” but if I use the CodeCharge forum it is empty.
So I modified the form action and I sent the same “hand form” to the original CodeCharge page and, in this case, the system variable that was correctly filled in my test page looks empty.
What I am doing wrong? Why I can’t use the $_FILE variable in CodeCharge?
Please help me!!!

Thanks
Regards
View profile  Send private message
jjrjr1


Posts: 942
Posted: 09/29/2008, 7:17 AM

Hi

Without looking at the code, or the CCS upload component code, My guess is that the on initiakize event is probably the wrong place to be looking at the $_FILE variable. If I understand you, you are cheking this after the page is reloaded after tha actual file has been uploaded.

I might suggest doing your code in the after process event for your upload control. You might want to look at the upload control class and see what it is doing with the $_FILE variable as well.

If you post some code, it might be helpul

Havew Fun

_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
datadoit
Posted: 09/29/2008, 7:34 AM

Are you using CCS's File Upload Component?

http://docs.codecharge.com/studio40/html/Components/Obj...Upload.html?toc
andreasa

Posts: 5
Posted: 09/30/2008, 12:41 AM

Hi,
thanks for help; yes i was doing alll my code in the on initialize event.
Onostely i did't try in the after process event and I will try it but the problem is that in the help file I read:

After Process - This event occurs after an uploaded file is moved to the target folder from the temporary folder but i have the temp file in the temporary folder but not in the target folder.

Right now i create a test page and I just place the control on the page and i insert the two folder (temp and target), the file is uploaded in the temp but is not moved in the target.

I am doing some test and i will post the code later today.

thanks

View profile  Send private message
jjrjr1


Posts: 942
Posted: 09/30/2008, 7:15 AM

BTW. look at the before process file event. and for some guidance look at the upload class and see what it is doing with the $_FILE value.

Have Fun
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
andreasa

Posts: 5
Posted: 10/01/2008, 8:31 AM

thanks a lot to all of you,
using the before process file event i solve the problem.
Your suggestion was appreciate

Thanks
Regards
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.