GithubHelp home page GithubHelp logo

Comments (12)

jlambe avatar jlambe commented on July 28, 2024

It was defined like so before but didn't work on windows computer for weird reasons ?!
I would need more users report to see if we have to change that line.

from framework.

franz-josef-kaiser avatar franz-josef-kaiser commented on July 28, 2024

I am on a windows computer :)

from framework.

jlambe avatar jlambe commented on July 28, 2024

Me too :) Does the framework run when you activate it ? I've tested several times on my windows7 and it keeps crashing when the DIRECTORY_SEPARATOR constant is defined. Is the constant from a PHP extension or is it in the core ?! Maybe my php config is not right.

from framework.

franz-josef-kaiser avatar franz-josef-kaiser commented on July 28, 2024

It's a PHP constant...

from framework.

jlambe avatar jlambe commented on July 28, 2024

Could you test on your local machine the framework by replacing /with the DIRECTORY_SEPARATOR and report what's happening? I need to fix this for 1.0, thx ;)

from framework.

eric-holmes avatar eric-holmes commented on July 28, 2024

One note here is that you should only be using DIRECTORY_SEPARATOR for php paths, not JS/CSS/images/etc. Just in case you are using it for any of those! ;)

from framework.

jlambe avatar jlambe commented on July 28, 2024

Hmmm that's probably the issue then. Yes the DIRECTORY_SEPARATOR was/is used for both paths and URLs. I haven't found in the docs any elements related to that.

from framework.

franz-josef-kaiser avatar franz-josef-kaiser commented on July 28, 2024

Yep, @ewholmes is right on that one. Btw, don't try PATH_SEPARATOR - I saw it was referenced in the same php.net docs page. That's just for separating/appending include paths.

from framework.

jlambe avatar jlambe commented on July 28, 2024

So the solution would be to keep DS as DIRECTORY_SEPARATOR and then define a second constant for urls with the value /. So everything keeps working whatever systems it is used on. Thanks for pointing that out!

from framework.

franz-josef-kaiser avatar franz-josef-kaiser commented on July 28, 2024

yes. But you can simply write / instead of using a second constant. That 2nd constant anyway wouldn't be anything else than what people use as default: /. I'd just drop it for clarity.

from framework.

eric-holmes avatar eric-holmes commented on July 28, 2024

Yeah I would agree with @franz-josef-kaiser - it's overkill - "folder" . PS . "script.js" is less readable than "folder/script.js"

from framework.

jlambe avatar jlambe commented on July 28, 2024

I'll fix all system paths with the DIRECTORY_SEPARATOR and make sure URLs use the simple / entity.
Fix for release 1.0

from framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.