PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, October 26, 2022

[FIXED] How to get name of admin folder in prestashop?

 October 26, 2022     prestashop-1.6, prestashop-1.7     No comments   

Issue

$link= PS_ADMIN_DIR;
$admin_folder = substr(strrchr($link, "\ "), 1);

currently i am using this way to get folder name, But if there are any direct method or any constant please suggest me.. Thanks


Solution

For security reasons, admin folder name is not stored anywhere in your PrestaShop's files or database, so you have to do something like you do to find it.

However, you should use _PS_ADMIN_DIR_ instead of PS_ADMIN_DIR as the second one is not defined directly by PrestaShop and could be undefined.



Answered By - ébewè
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,213,716

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing