How to access to limesurvey database in PHP

More
4 years 6 months ago #88093 by wjzwjh
wjzwjh created the topic: How to access to limesurvey database in PHP
I just want to access to LimeSurvey database. However, in my PHP code first line, I put require_once '/application/config.php' as a way to load up the LimeSurvey DB Information. But the page always return("No direct script access allowed"). And I check config.php file, and only when basepath is not defined can generate this problem.(if (!defined('BASEPATH')) exit('No direct script access allowed');) So how and where to set the basepath. Thanks for everyone in advance here.

Please Log in to join the conversation.

More
4 years 6 months ago #88097 by DenisChenu
DenisChenu replied the topic: How to access to limesurvey database in PHP
Hello,

Just :

define ('BASEPATH', '');

before include.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now