Page 1 of 1

External PHP Application

Posted: Sat Mar 12, 2005 3:25 pm
by Roaster
Hi,

how can I use the "External PHP Application" plugin? I've created a new directory called "php" inside the s9y directory and copied an index.php into it.

I've set:
Permalink: /index.php?/static/test.html
URL shorthand name: phpname
File to include /is/htdocs/60841/www.mydomain.de/blog//php/index.php

But nothing happens. How can I call this page?

cu,
Roaster

Posted: Sat Mar 12, 2005 9:51 pm
by Roaster
Answering myself: I got this running.

I wanted to add a formmailer script which is running more or less perfect. I've got a simple problem:

Code: Select all

<form class="formular" action="index.php" method="post">
Using the action like above possibly detected errors within the form aren't displayed anymore. When using

Code: Select all

http://localhost/serendipity/index.php?serendipity[subpage]=contact
it works perfectly.

Now, how do I get rid of this long path in the last coding? I've tried to use

Code: Select all

<?php echo $PHP_SELF ; ?>
but the variable is empty!.

Any hints?
cu,
Roaster

Posted: Sat Mar 12, 2005 10:08 pm
by Roaster
Answering meyself agin ;-)

I've checked the recommended way to get global vars using

Code: Select all

<h1><?php echo $_SERVER[PHP_SELF] ; ?></h1>
However I got back this path/file:

Code: Select all

/serendipity/index.php
My script is saved into "/serendipity/php/index.php". So the problem still exists: Is there a simple way to get the current loaded file?

cu,
Roaster

Posted: Sun Mar 13, 2005 1:56 pm
by garvinhicking
Use

Code: Select all

$_SERVER['REQUEST_URI']
Regards,
Garvin

Posted: Sun Mar 13, 2005 1:58 pm
by Roaster
Thanks Garvin,

you won't believe it but I found the same solution :P

Thx,
Roaster