Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6191749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:49:16+00:00 2026-05-24T02:49:16+00:00

Here is my problem: I have a website running on IIS 7 + PHP

  • 0

Here is my problem: I have a website running on IIS 7 + PHP 5.3. There is a virtual directory in the website hierarchy called “vd” which contains flash files.

myApplication
– test.php
– vd
    – animation1.swf
    – animation2.swf
– …

So, it’s easy to reach the swf files with a browser, you just have to put the directory name in the url: http://www.mySite.com/vd/animation1.swf

However, I would like to use the getimagesize() function on my animations in a PHP script. But in this case, php can’t find the file:

<?php
    // test.php
    var_dump(getimagesize('vd/animation1.swf')); // false
?>

It seems to make sense because anyway ‘/’ aren’t even the right directory separator for windows. But I just can’t figure out how to make getimagesize works through a virtual directory, I tried a lot of stuff without success (using the DIRECTORY_SEPARATOR constant, using realpath() function …).

Of course, I could use the real path in my script but it would be easier for me to be able to do that throught the virtual path.

Any help would be greaty appreciated,
Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:49:16+00:00Added an answer on May 24, 2026 at 2:49 am

    PHP is not going through the web server but rather the OS to get the file. So, no web server virtual-to-real translations will take place. You will need to use the real path of the file. You could make a web request on the file and deduce the size in that manner but that is very inefficient. It makes much more sense to just do it right through the OS.

    Simply create a variable/define/class constant or whatever you prefer to store the real path of the pertinent directory. Then just append animation1.swf to that in your code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net mvc app running on a local iis website that is
I have an app that accesses information about websites running on IIS on a
I'm taking over a website for a client that is running on a custom
I have MySQL running such that I can open a client command line and
I have a web application set up on our intranet that uses windows authentication
Okay, so I'm running a small test webserver on my private network. I've got
I have created an OData/WCF service using Visual Studio 2010 on Windows XP SP3
I keep running into all sorts of nuances between the web site project versus
I am currently working on a custom SharePoint web part (WSS 3.0, not MOSS)
I am kind of stumped with this one, and was hoping I could find

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.