Question

Just a curious question.

I noticed that when you generate a non fatal php error,

<b>Warning</b>:  implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in...

but the links are nonsense.

If they are going to link it why do they not link it to the php manual?

or is there someway you can reroute the errors yourself?

Was it helpful?

Solution

There are 3 php.ini settings that control this behaviour

By setting html_errors = 0 no links will be created.

The value of docref_root will be prependend to those URLs, value could be http://www.php.net or some other url more suitable for you. For example http://www.php.net/function.implode is a valid url.

Finally, there is docref_ext, which - if it exists - must start with a dot and this will be appended to the link. Useful if you need to add for example ".html" to the end of the links.

Good starting point in the documentation for all 3 is: http://www.php.net/manual/en/errorfunc.configuration.php#ini.html-errors

As for why - it makes it easier for beginner developers to figure out what any given error means.

OTHER TIPS

My guess? So that the PHP developers can right-click and use "Copy Link" or the like to copy certain things out of errors rather than having to worry about highlighting the right text.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top