February 21, 201312 yr I was wondering if it is possible to use local html data (i.e. "data:text/html," & $OtherStuff) to access PHP functions? My little tests haven't gone well so far. Here is what I have tried: Table "PHP_test"; 1 text field: html_code Layout: 1 edit box for PHP_test::html_code, one web viewer The web viewer has the 'web address' defined to be "PHP_test::html_code". I populate the field on the layout, it shows on the web viewer (or at least that is the idea). I am exploring the possibility of using some PHP functions to achieve results on FM data in the database. My first test was simple: <html><head><title>PHP Test</title></head> <body>Hello World</body> </html> OK, that works. Now a simple PHP test: data:text/html, <html><head><title>PHP Test</title></head> <body> <?php echo "Hello world" ; ?> </body></html> That doesn't work. Neither does a call to: <?php phpinfo(); ?> I just get a blank web viewer. Is it not possible to have the web viewer run PHP in this manner? Thanks, J
February 21, 201312 yr Where is PHP installed? You can certainly call a PHP page from the web viewer, but it needs to be on a web server with PHP (even if that web server is your local machine)...
February 25, 201312 yr Author (Hrmm...didn't get notification about this reply. Sorry for the late response.) Not doing anything 'served' up, just using FM's data URLs, defining the web viewer to be: "data:text/html, ...". So the full definition of the web viewer is: data:text/html, <html><head><title>PHP Test</title></head> <body> <?php echo "Hello world" ; ?> </body></html> Assuming that PHP is installed on the local machine, shouldn't that render the same in a web viewer as a client? (Hmmm...that doesn't work in my client, either.) --J
February 26, 201312 yr Well no... as it needs to Preprocessed by a server somewhere... There are plugins for FileMaker which will do that within a field and that can then probably be viewed by a web viewer as well...
March 20, 201312 yr Author OK, long time in coming; been busy with other stuff...and again, not getting notifications about responses. Odd. Anyway, thanks for the information. -- J
Create an account or sign in to comment