Jump to content

P0oltj3

New Members
  • Posts

    7
  • Joined

  • Last visited

P0oltj3's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for your snippet I`ll be sure to use it when I`ll have to use PHP_SELF.
  2. Yeah its mostly for learning experience and not a production environment. Actually what DavidAM just wrote is what I meant by not trusting $_SERVER but thats the PHP_SELF value that I actually don`t trust. Thanks for some experience story's!
  3. What I actually meant is that I want to make al my file links flexible because I had enough trouble with hardcoded systems. So what White_lily said was just a good reminder of setting own globals but it wasn`t the answer. I completely understand what you mean Christian it`s just that I`m trying to hard to make my system work exactly like I want it to work. Right now I`m just using the document_root and everything is working fine. So thanks for helping everyone. Ps: Christian I can completely rely myself to the post you linked to but in my case it`s just that I want to understand what every single line of code does and I`m not jQuery pro so I need to take time for that I don`t really have at this moment.
  4. oh yeah I totally forgot about setting own globals thank you for reminding! I need to get my head back in. I`ll search for dos and cons for that.
  5. I have read that $_SERVER values can be changed by the server settings. So if my webserver would be wrongly set up in that particular part it could be that certain parts of the application would just go white.
  6. Right now I`m trying to convert my structure so that I wouldn't have to use $_SERVER['DOCUMENT_ROOT'] or a alternative. So something that your suggesting. Thanks for fast answer.
  7. Hallo phpfreaks, I`m new to this specific forum so I would like to contribute to some topics in the future. My question here is about absolute php paths. Right now I`m busy with making my own cms and I want to make it as flexible as possible. I`m not a fan of frameworks or library's so I`m making everything by myself (for this project). I already found a specific script that does exactly what I want to accomplish but I`m not so happy with that it uses $_SERVER['DOCUMENT_ROOT'] and this is the script that I found: substr( str_replace( '\\', '/', realpath(dirname(__FILE__))), strlen( str_replace( '\\', '/', realpath($_SERVER['DOCUMENT_ROOT'])))); At this moment I`m using Windows so this is the output that I get with it: /Projects/cms/5113/htdocs2 I was hoping that someone would know a alternative to the $_SERVER part. If it`s unclear what I`m trying to accomplish I`ll just write the whole story for you.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.