[FX.php List] Container Quandary

Bob Patin bob at patin.com
Wed Oct 7 13:26:56 MDT 2009


David,

Several thoughts:

If you want to display a container's contents on the web, make sure  
you use this in the top of your code:

include_once('FX/image_proxy.php');

Next, to retrieve it, here's how I use it:

// get the logo and letterhead data
$query2 =new FX($serverIP,$webCompanionPort, $dataType, $scheme);
$query2->SetDBData($dbname,'web_prefs',1);
$query2->SetDBPassword($webpw,$webun);
$query2Result = $query2->FMFindAll();
foreach($query2Result['data'] as $key=>$query2Data);

$logo="FX/image_proxy.php?FXimage=".vignereEncryptURL($query2Data 
['cont_logo'][0]);
$company_name = $query2Data['company_name'][0];
... and so on

NOW...

My suggestion would be to store images separately; for one thing, your  
database gets bloated with container storage, while a web server  
doesn't care if you throw tons of graphics at it.

There are instances, like the example I showed above, where it's a  
good use of containers; for example, I sell a solution where the  
client can put his company logo into a container in the database, and  
then I use that to display his letterhead in the web application.

FOR UPLOADING:

I use PHP standard upload scripts to do uploading to the web server;  
one particular gotcha is to be sure that the folder to which you're  
uploading has the proper permission (read/write) in order to accept  
uploads (could it work with WRITE-ONLY, I don't know; someone answer  
that question?). I always use chmod 777 (all r/w) when I set up upload  
folders.

SuperContainer is a great product, but if you're planning to have a  
lot of graphics, you should store them on the web server; I'm not  
positive about this, but I strongly suspect image loading will be  
faster from the web server anyway.

Hope this helps; best,

Bob Patin



Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
iChat: bobpatin
FileMaker 10 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--------------------------
FileMaker hosting and consulting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting


On Oct 7, 2009, at 2:19 PM, David Cox wrote:

> Forgive me if this has already been addressed before, but I've not  
> been able to find a solution to this problem in the documentation I  
> have searched through:
>
> I would like to add/view/update the contents of a filemaker  
> Container field using fx.php.  I see that there are some tags in the  
> FileMaker.php api, but I've not been able to find anything for  
> fx.php.  I also see that php can handle file uploads to server disk,  
> so should I try to pull it into the Container from the server disk  
> via filemaker script?  So my questions to everyone are:
>
> can I use fx.php 'as is' to do this, but I'm just overlooking the  
> obvious?
> what other ways are there to accomplish this for the least cost?
> browser->php->serverdisk->filemaker container
> browser->php->filemaker
> I've seen some other third-party options which have varying degrees  
> of functionality (radinks.com, 360works SuperContainer, w3Schools,  
> File Thingie, etc.)
> Do you have any suggestions?  Thank you for your help!
>
> David
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
Skipped content of type multipart/related


More information about the FX.php_List mailing list