Fork me on GitHub

Announcement

The oneye project has been discontinued. You might not expect further fixes and support from us. All community related systems are set to read-only mode. Though feel free to download and use oneye as-is or even fork it over at GitHub.

#26 2015-03-04 15:50:52

sazearte
Member
From: France
Registered: 2013-10-23
Posts: 234

Re: [FIXED] Address of a file

What OS you use?
What version of php?

Offline

#27 2015-03-04 16:33:53

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: [FIXED] Address of a file

I'm using Windows 8.1 as client and server OS.

My server is the preinstalled IIS, PHP is at version 5.6.6 - but that shouldn't be a problem at all.


Best regards,
Lars Knickrehm

The oneye project.

Offline

#28 2015-03-04 20:15:39

sazearte
Member
From: France
Registered: 2013-10-23
Posts: 234

Re: [FIXED] Address of a file

There you must activate a php module?

I use wampserver in Windows8.1 and lamp in Debian8

Offline

#29 2015-03-04 20:39:49

sazearte
Member
From: France
Registered: 2013-10-23
Posts: 234

Re: [FIXED] Address of a file

It's work, i use this code:

$file = $params[0];
		$fp = vfs('open',array($file,'r'));
		if(!$fp) {
			eyex('messageBox',array('content'=>'File not found'));
			return;
		}
		
		$size = vfs('filesize',array($file));
		$content = fread($fp,$size);
		fclose($fp);
		$myContainer->setContent('<br><br>the file '.$params[0].' : <br><pre>'.$content.'</pre>'); 

But it's work with only txt file, i want to open video for example.

Last edited by sazearte (2015-03-04 21:56:02)

Offline

#30 2015-04-26 21:02:38

sazearte
Member
From: France
Registered: 2013-10-23
Posts: 234

Re: [FIXED] Address of a file

I found my error, for read my video file i use this:
<source type="video/mp4" src="' . htmlspecialchars($URL, ENT_QUOTES, 'UTF-8') . '" />

This is not $URL but $url.

thanks for your help !

Offline

#31 2015-04-26 21:17:10

sazearte
Member
From: France
Registered: 2013-10-23
Posts: 234

Re: [FIXED] Address of a file

I still have a question, I want my container the same size as the window

So that the size of my video suits the size of the window.

	$myWindow = new Window(array(
		'name' => 'Gmail_WND',
		'father' => 'eyeApps',
		'cent' => 1,
		'width' => $_SESSION['SCREEN']['eyeApps']['width'],
		'height' => $_SESSION['SCREEN']['eyeApps']['height'],
		'x' => 0,
		'y' => 3,
		'title' => 'Mediaplayer',
		'sendResizeMsg'=>1,
		'sigResize'=>'Resize'
	));
	$myWindow->show();
	
$myContainer = new Container(array(
	'father' => Gmail_WND,
	'height' => $height,
	'name' => test,
	'width' => 1000,
	'x' => 1,
	'y' => 20
));

Offline

Board footer

Powered by FluxBB