require_once (v2022)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
gargiulo
User
Posts: 49

require_once (v2022)

Post by gargiulo »

Sorry with this simple problem but i'm really not able to figure out it.

i have a web site which contain under the main folder additional custom folders e.g.

  • customphp (which contains my additional php scripts)
  • pdf (which contains pdf libraries)

in client/server events -> table specific -> Common -> row inserted i put the below code :

// Row Inserted event
function Row_Inserted($rsold, &$rsnew)
{
    //Log("Row Inserted");

$my_id=$this->id->CurrentValue;
require_once('../customphp/testmail.php?id=$my_id');
}

but it doesn't run, and i tried several time looking at the routing changing "../customphp/" in "customphp/" or "../../customphp/" without results , the program crash due to the fact that it doesn't recognize the file to open.
I have no additional idea to modify the code and advice is greatly appreciated

thanks


arbei
User
Posts: 9384

Post by arbei »

If you are not sure if the relative path is correct, you better use __DIR__ instead, see Magic constants.


Post Reply