The document says that
<?php bloginfo(‘template_url’);?>
but the output is just the theme folder, not the full URL.
NB my task is to get the php file url in the theme folder
If you use a child theme, other solutions will not work, this will give you the parent theme directory. For children's themes, use this:
<?php bloginfo('stylesheet_directory'); ?>
Try get_included_files ()
It will list everything, but will use the path to the file system, not the URL
<?php echo get_template_directory_uri(); ?>
You can try below code to get the current theme url in wordpress
or