Jump to content

I can't find my error!


nikefido

Recommended Posts

and i'll post the info about it just as soon as phpfreaks stops telling me i don't have permission to view forums/index.php.

 

error code: Parse error: syntax error, unexpected ';', expecting T_FUNCTION in C:\wamp\www\design_template\includes\create_doc.php on line 43.

 

Line 43 is the "?>" line.

 

I can't find any syntax errors.

However, this is a parse error. What should I be looking for here?

 

(I'll try to post the code....if php freaks will ever let me...)

Link to comment
https://forums.phpfreaks.com/topic/92952-i-cant-find-my-error/
Share on other sites

Right, intrusion system blocking some functions, so:

 

<?php
class fidoDoc {

var $projName;
var $unixServer;
var $theContent;


function doDoc($proj_name, $content) {
	$this->theContent = $content;
	$this->projName = $proj_name;
	$this->testServer();
	return $this->open_write_close();
	}//end function

function testServer() {
	if($serverType = stristr($_SERVER['SERVER_SOFTWARE'], '(Win32)') || $serverType = stristr($_SERVER['SERVER_SOFTWARE'], '(Win64)')) {
		$this->unixServer = false;
	}
	if($serverType = stristr($_SERVER['SERVER_SOFTWARE'], '(Unix)') || $serverType = stristr($_SERVER['SERVER_SOFTWARE'], '(Linux)')) {
		$this->unixServer = true;
}//end function

function open_write_close() {
	$path = getcwd();
	if($this->unixServer) {
		$path .= '/upload/'.$this->projName.'.html';
	} else {
		$path .= '\\upload\\'.$this->projName.'.html';
	}

	$ok = true;

	if($handle = fileopen($path, 'w')) {
		if(filewrite($handle, $this->theContent)) { 
			fileclose($handle); 
		}else{ 
			$ok = false; 
		}
	} else {
		$ok = false;
	}
	return $ok;
}//end function

}//end class
?>

Link to comment
https://forums.phpfreaks.com/topic/92952-i-cant-find-my-error/#findComment-476232
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.