spara som .php (så att ingen kan komma åt filen utan att den har exekverats) och sedan så är det bara att köra <? include ("funktioner.php"); ?>
Många använder .inc men då kan det hända att någon letar reda på dinfil.inc och om du skulle råka ha lösenord etc där så skulle ju inte det vara så bra för då kan de se dem och de kollar källan... använder du .php så kommer ju funktionen att köras och endast html-kod synas i källan
require() and include() are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error. In other words, don't hesitate to use require() if you want a missing file to halt processing of the page. include() does not behave this way, the script will continue regardless. Be sure to have an appropriate include_path setting as well.
255 ms totalt · 4 externa anrop · v20260731065814-full.86ec41c2