Jump to content

[SOLVED] opendir error


Miko

Recommended Posts

Hello,

 

I'm encountering a problem with this script:

 

	$depot = $explode[0];
$date = $explode[1];
$tournr = $explode[2];

$open = opendir("http://serveraddress/folder/$depot/$date/$tournr/"); // (It is an intranet script)

$files = glob("http://serveraddress/folder/$depot/$date/$tournr//*.jpg");

?>

	<div class="images">

		<p>Selected depot / date / tour:<br /> <strong><?php echo "D".$depot." /  D".$date." / ".$tournr ?></strong></p>

<?php

	for($i=0; $i<count($files); $i++){

		$num = $files[$i];
		$filename = basename($num, ".jpg");
		//$size = getimagesize($dir.$filename.".jpg");
		$width = $size[0];
		$height = $size[1];
		$filename_explode = explode("-",$filename);
		$filenam = $filename_explode[1];

		?>

			<div class="images_result">
				<img id="image" src="<?php echo $num; ?>" alt="Signature <?php echo $filename; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" />
					<p><?php echo $filenam; ?></p>

			</div>

		<?php

	}

	?>

	</div>

 

The code works just fine, but I get this error messages:

 

Warning: opendir(http://serveraddress/folder/0532/20091023/T336/) [
function.opendir
]: failed to open dir: not implemented in D:\xampp\htdocs\folder\images.php on line 10
Selected depot / date / tour:
D0532 /  D20091023 / T336

 

Basically I'm trying to open a folder with images that is located on one of our servers, but it wont work :(

 

Anyone know why?

 

Thanks :)

Link to comment
Share on other sites

Actually I'm building a small web app does should work like this:

 

  • User goes to the web page where there are 4 different depotnumbers (hard coded)
  • User selects his depot number and get's then a combo box with several dates in it (this is loaded in another script using an Ajax script)
  • User choses date and get's then the images

 

These images are stored on the server off course, I've developed and tested the web app on my local pc (using xampp) so the opendir works fine.

But since the users don't open the web app on the server but via there own pc it doesn't work, so as you said, I should use ftp connection then.

 

What function is there for this?

Link to comment
Share on other sites

or you can put a PHP script on your image server which gives you the urls of the image, I think that would be better than opening it in ftp, using the same opendir function only you can pass the path to that script and it can return you the urls then you could call that script from within your script on your other server get the urls process them and display them

Link to comment
Share on other sites

lol I've got it :)

 

just done it with opendir("./folder/");

this works! :D

 

but the annoying part is .. the files are images, and firefox shows me the images, but not Internet Explorer  :suicide:(tested in IE 6 ,7 8)

 

Got an idea?

Link to comment
Share on other sites

I would like to, but since it is an intranet app and we don't have a public web server (well there is but this one in another country and we don't have permission :( ).

I can maybe check some free php scripts that gives the opportunity to upload images and view them on a web server, something like wordpress

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.