May 9th, 2009, 1:26 PM
(May 9th, 2009, 12:57 PM)Ben Wrote: Hmm... it does *sound* like the require_once() path is incorrect, I must confess. That function is defined in api.php, so if the file is included properly you should never see the error.
Try switching between a relative and absolute path and see if that helps.
- Ben
That's what I thought too... but, when I changed the path to something I knew was wrong I got this instead:
"Warning: require_once(/election/database/global/api/api.php) [function.require-once]: failed to open stream: No such file or directory"
So I know the other path was correct (and absolute)
Maybe this will help:
I'm building my website with a CMS called concrete5 and in order to execute code when I website loads it needs to be part of another function. The entire code is here:
PHP Code:
<?php
class CandidatesRegistrationController extends Controller {
public function on_start() {
require_once("http://election.cya-ajc.ca/database/global/api/api.php");
$fields = ft_api_init_form_page("", "test");
$params = array(
"submit_button" => "submit",
"next_page" => "/success.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
}
}
?>
Any more thoughts?