CodeIgniter Forums

Full Version: basepath is so that it can not see all of a sudden
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We very troubled in the next issue. I want you to tell me the cause and solutions if there is a similar problem.

problem

Constant value that has been able to see so far is Exit in the reference section of the framework will not be able to see all of a sudden.

Environment
- Program PHP5.5
- Platform MicroSoft Azure Web Apps
- Framework Codeignitor 2.2.1


Restoration

To recover when you restart the WepApps instance of Azure.
While not a restart in reverse, it does not improve symptoms in all of the requests.


Guess symptoms

index.php
// Path to the system folder
define ( 'BASEPATH', str_replace ( "\\", "/", $ system_path));



require_once BASEPATH.'core / CodeIgniter.php ';

* At this time, the effective?

CodeIgniter.php

<Php if (defined ( 'BASEPATH')!) Exit ( 'No direct script access allowed')?;

* Be Exit 1 line of here. Here, the "BASEPATH" is no longer able to see?
* This "<php if (defined ( 'BASEPATH')!) Exit ( 'No direct script access allowed');?", In order to present in all of the source on the framework
There is a possibility that a problem in places not here possibly but to assume the position for generating the same.



Screen

Of processing Exit on the screen is displayed as "No direct script access allowed".
I think you're mixing up some things.

The line
PHP Code:
<Php if (defined 'BASEPATH')!) Exit ( 'No direct script access allowed')?; 

Should be:
PHP Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 

The !-mark means "not". If you omit that, or if you put it in the wrong place, your website will throw the "No direct script access allowed" in all cases, because the BASEPATH constant has been defined.
Exclamation mark is misplaced and it is meant to finish sentence 'No direct script access allowed!'