0

Does anyone had an idea to how make an image visible on both side ?

Let me explain :

  • I don't use any CMS
  • I write with my own WYSIWYG
  • My data folder is called DATA
  • My back office folder is called ADMIN

There are my pages :

  • index.php => Front page.
  • ADMIN/index.php => Back page.
  • data/images => Pictures folder

When I'm on the back office, I upload an image via a script. I can see my image on the WYSIWYG and his link are relative: ../data/images/1.jpg

Ahah? Yes, because when I'm on the front office, the link is wrong.

I don't want to replace (via str or whatever) the "../" when I'm saving my page or when I'm editing it.

I know there is a fu**ing easy idea, but can't find out.

Thanks! ;)

Anonymous
  • 77
  • 1
  • 7
  • https://stackoverflow.com/questions/5450713/getting-complete-path-of-uploaded-file-php – zfrisch Nov 26 '18 at 17:40
  • I can't take the full path, because if the guy change the website folder or the domain name (after migration), every links will be dead. – Anonymous Nov 26 '18 at 17:48

0 Answers0