I would like to know how to create a php function that can be installed in php as well as already built functions:
rename copy
The main point I would like to get is a simple php function that can be called from ANY php page to the entire host without having to have a php function inside the php page / need to be included.
so simple I would like to create a function that will work as follows:
location();
The fact that without a given input line will output the current file location via echo, etc.
, , . , :
http://docstore.mik.ua/orelly/webprog/php/ch14_01.htm
http://www.tuxradar.com/practicalphp/2/3/0
, . - , . PHP, C Zend Engine . , , , , .
PHP, helper_functions.php. php.ini : auto_prepend_file = helper_functions.php. , include_path ( php.ini).
helper_functions.php
php.ini
auto_prepend_file = helper_functions.php
include_path
, include 'helper_functions.php'; script. , .
include 'helper_functions.php';
auto_append_file.
So, you want to extend the main PHP language to create a function with a name location()written in C that can be executed in PHP:
location()
echo __FILE__;
Right Enjoy it.
Source: https://habr.com/ru/post/1739472/More articles:как установить autoplay = true в google audio player? - .netServer response / callback after downloading Silverlight file - file-uploadПочему EnumerableRowCollection.Select() не компилируется? - c#https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1739470/bulk-convert-list-of-book-titles-to-amazon-asins&usg=ALkJrhgl-OD5xIAG5-SzubWECN2ZEJH3WQBest practices for configuring PHP mysql connection - phpHow to use Inno Setup scripts to edit a text file? - appendIs this a bad design pattern? - javaDifferences between IE7 and Firefox / Opera / Chrome - htmlLooking for a free tool for visualizing object relationships for C # - .netLaunch Django as a Windows Service - djangoAll Articles