CodeIgniter Forums
basepath is so that it can not see all of a sudden - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: basepath is so that it can not see all of a sudden (/showthread.php?tid=64874)



basepath is so that it can not see all of a sudden - kosaka - 04-06-2016

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".


RE: basepath is so that it can not see all of a sudden - Wouter60 - 04-06-2016

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.


RE: basepath is so that it can not see all of a sudden - Tpojka - 04-06-2016

Exclamation mark is misplaced and it is meant to finish sentence 'No direct script access allowed!'