Skip to content
Snippets Groups Projects

changes with get_config by adding base path

Merged V Harish Ragavendher requested to merge push into master
9 files
+ 45
50
Compare changes
  • Side-by-side
  • Inline
Files
9
@@ -8,14 +8,16 @@
<link rel="canonical" href="https://getbootstrap.com/docs/5.2/examples/album/">
<link href="/Php/photogram/App/assets/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="<?get_config(" base_path")?>/App/assets/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- <?//print(basename($_SERVER['PHP_SELF'], ".php").".css")?> -->
<?if (file_exists($_SERVER['DOCUMENT_ROOT']."/Php/photogram/App/css/".basename($_SERVER['PHP_SELF'], ".php").".css")) {?>
<!--//print(basename($_SERVER['PHP_SELF'], ".php").".css")-->
<?if (file_exists($_SERVER['DOCUMENT_ROOT'] . get_config("base_path") . "/App/css/" . basename($_SERVER['PHP_SELF'], ".php") . ".css")) {?>
<link
href="/Php/photogram/App/css/<?=basename($_SERVER['PHP_SELF'], ".php")?>.css"
href="<?=get_config("base_path")?>/App/css/<?=basename($_SERVER['PHP_SELF'], ".php")?>.css"
rel="stylesheet">
<!-- here we are loading the css file in an autoamted way like we already know document root has the location to htdocs
and after that we are giving the css folder location there we are using base name function from php self which is the
file name we are using for eg: login.php will be in php self means basename will give the output like login and we are
manually adding .css which results the file name -->
<?}?>
</head>
\ No newline at end of file
Loading