Reputation: 6798
i created order form in php (if the php file is alone its working, i tested it on my apache server.. its using sessions and a lot of if statements.) I thought i will install DirectPHP and just insert <?php tags..
but it dont work.. only really strange so i installed Jumi plugin and if i upload my php file to / directory on joomla server and into article paste {jumi [/test.php]}
test.php
<?php echo "test"; ?>
in article it writes
The file /test.php does not exist or is not readable!
i set attributes to 777 so its not about permissions.. what can i do ? thank you.
edit: I tried DirectPHP with <?php include("./phpfile.php") ?>
----------------------------------------------
and i found that there are two php constructs which does not work.. first is multidimensional array like that
$doprava = [
array("nazev" => "Přepravní firma po ČR", "cena" => 125),
array("nazev" => "Česká pošta - Balík do ruky", "cena" => 120),
array("nazev" => "Česká pošta - Balík na poštu", "cena" => 115),
];
or $abc = [array()];
(both does not work --> it returns internal 500 error)
and second is goto
goto html;
html:
maybe i can workaround goto (i dont know how for now, but why does not work array ?)
Upvotes: 0
Views: 429
Reputation: 10609
Or you could save yourself a ton of problems and just us a form component like RS Forms or Chronoforms. Chronoforms would probably be very good for what you want because it allows you a high level of customization. We've built very complex order forms in Chronoforms many times.
Upvotes: 1
Reputation: 36
if you want show a php file. I think DirectPHP is very good. you can do it link this:
<?php include("./phpfilename.php");?> (note:./ joomla root)
goog luck!
Upvotes: 2