Subversion Repositories eFlore/Applications.cel

Rev

Rev 1065 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1065 Rev 1089
Line 27... Line 27...
27
	 * Constructor. Parses the configuration file "JRest.ini", grabs any request data sent, records the HTTP
27
	 * Constructor. Parses the configuration file "JRest.ini", grabs any request data sent, records the HTTP
28
	 * request method used and parses the request URL to find out the requested resource
28
	 * request method used and parses the request URL to find out the requested resource
29
	 * @param str iniFile Configuration file to use
29
	 * @param str iniFile Configuration file to use
30
	 */
30
	 */
31
	public function JRest($iniFile = 'jrest.ini.php') {
31
	public function JRest($iniFile = 'jrest.ini.php') {
-
 
32
		
-
 
33
		if(!isset($_SESSION)) {
-
 
34
			session_start();
-
 
35
		}
-
 
36
		
32
		$this->config = parse_ini_file($iniFile, TRUE);
37
		$this->config = parse_ini_file($iniFile, TRUE);
33
		if (isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && isset($_SERVER['QUERY_STRING'])) {
38
		if (isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && isset($_SERVER['QUERY_STRING'])) {
34
			if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > 0) {
39
			if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > 0) {
35
				$this->requestData = '';
40
				$this->requestData = '';
36
				$httpContent = fopen('php://input', 'r');
41
				$httpContent = fopen('php://input', 'r');