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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.