Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4335 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

 

 

 

Posted

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)...

Posted

(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

Posted

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...

  • Like 1
  • 4 weeks later...
Posted

OK, long time in coming; been busy with other stuff...and again, not getting notifications about responses.  Odd.

 

Anyway, thanks for the information.  

 

--  J

This topic is 4335 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.