Calling Normal Php Page from SC

Hi,

Anyone know; how to call a normal PHP page from SC application. I have few php pages and I just need to call them from SC blank application. I dont want to paste that code inside the SC. Any help here would be highly appreciated.

sc_redir(file.php);
From SC macros help:

sc_redir(Application, Parameter01; Parameter02; Target, Error, height_modal, width_modal)
This macro its used to redirect the processing to other application or URL.

If the redir uses parameters, these must be passed in the following format:
1) After the name of the application, use the comma delimiter (,) then
2) = (equal sign) .
3) More than one parameter, must be separated by semicolon (:wink:
4) The target determine which application is opened (default=_self): _self, _parent, _blank or modal.
5) Optional parameter to set error messages redirection in the application: “F” redirects if there is error in the application (default value) and “E” does not redirect.

OBS. If your connection uses transaction control the use of this macro on the events onAfterInsert, onafterupdate, onAfterDelete, onBeforeInsert, onbeforeupdate or onBeforeDelete should come after the use of macro sc_commit_trans so this way it will save the form changes.

Ex. 1: Application without parameters nor target.
if ([global_user] == “test”)
{
sc_redir(application_x.php);
}

Ex. 2: Application with parameters and without target.
if ([global_user] == “test”)
{
sc_redir(application_x, parm1={var_test}; parm2=“xxx”);
}

Ex. 3: Application without parameters and with target.
if ([global_user] == “test”)
{
sc_redir(application_x, “”, “_parent”);
}

Ex. 4: Application with parameter and target.
if ([global_user] == “test”)
{
sc_redir(application_x, parm1={var_test}; parm2=“xxx”, “_blank”);
}

Ex. 5: URL.
if ([global_user] == “test”)
{
sc_redir(http://www.my_page.com);
}

OBS. Everthing that was passed as parameter to the called application will be avaliable as global variable.

EX: sc_redir(employee.php, parm1={var_test}; parm2=“xxx”, “_blank”);

In the employee.php application the parameters will be acessible at [parm1] and [parm2]

I am aware of sc_redir. But this will work only if the form is generated by SC as this follows some sort of structure. My question was if we have a plain php (not generated via SC) how to call from SC.

I think sc_redir(http://www.my_page.com); might work. Let me try and get back. This is helpful.

I dont know if is a bug But…
It dont show nothing
sc_redir(http://www.my_page.com);

shows web page correctly
sc_redir(https://www.my_page.com);

SC shows only pages with https:

How show pages with http?

I use this function to call php files and pass variables:

function includeFileWithVariables($fileName, $variables) {
   extract($variables);
   include($fileName);
}

example:

includeFileWithVariables("C://path//to//file.php", array(
    'var_one'=> "{SC_var}",
    'var_two'=> $php_var
));