Welcome Guest, Not a member yet? Register   Sign In
No direct script access allowed
#1

[eluser]qwertyjjj[/eluser]
I just installed CI and went to this address http://localhost/application/config/config.php
but I get the error:
No direct script access allowed

Any ideas?
#2

[eluser]Mauricio de Abreu Antunes[/eluser]
It's a validation created in your php file (config.php).
Read your file. Smile
#3

[eluser]InsiteFX[/eluser]
You may also need to configure your browser to allow javascript.
#4

[eluser]porquero[/eluser]
Well, the question is: Why you need access to config file by url?

For security reasons you can't access to php file directly. You must use mvc.
#5

[eluser]InsiteFX[/eluser]
If you look at the .htacess file in the ./application directory you will see why your getting that error!
#6

[eluser]Aken[/eluser]
[quote author="InsiteFX" date="1329392712"]You may also need to configure your browser to allow javascript.
[/quote]
What on earth does this have to do with the problem he's having? lol
#7

[eluser]InsiteFX[/eluser]
Because you will get the same error if javascript is turned off in the browser!
#8

[eluser]qwertyjjj[/eluser]
[quote author="InsiteFX" date="1329432600"]Because you will get the same error if javascript is turned off in the browser!
[/quote]

On another note, does anyone actually turn off Javascript anymore?
I think this is just one of those things programmers liked to worry about whereas in reality most people don't even know what Javascript is or how to change a setting so they just leave it as it is.
ALmost every single website uses javascript, jQuery or other nowadays so why would anyone ever turn it off.
#9

[eluser]Aken[/eluser]
[quote author="InsiteFX" date="1329432600"]Because you will get the same error if javascript is turned off in the browser!
[/quote]
Only if someone actually set up a noscript element and added that message. And it CLEARLY is from the no basepath bit of code that's at the top of every CI-based application file.
#10

[eluser]CroNiX[/eluser]
A lot of search engines still don't use javascript, or only use limited javascript. So, it is still important from a SEO standpoint.




Theme © iAndrew 2016 - Forum software by © MyBB