Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to access a file with PHP in a virtual directory on IIS 7
    primarykey
    data
    text
    <p>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.</p> <p><strong>myApplication</strong><br/> - test.php<br/> - vd<br/> &nbsp;&nbsp;&nbsp;&nbsp;- animation1.swf<br/> &nbsp;&nbsp;&nbsp;&nbsp;- animation2.swf<br/> - ...</p> <p>So, it's easy to reach the swf files with a browser, you just have to put the directory name in the url: <a href="http://www.mySite.com/vd/animation1.swf" rel="nofollow">http://www.mySite.com/vd/animation1.swf</a></p> <p>However, I would like to use the <a href="http://php.net/manual/en/function.getimagesize.php" rel="nofollow">getimagesize()</a> function on my animations in a PHP script. But in this case, php can't find the file:</p> <pre><code>&lt;?php // test.php var_dump(getimagesize('vd/animation1.swf')); // false ?&gt; </code></pre> <p>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 <a href="http://www.php.net/manual/en/dir.constants.php" rel="nofollow">DIRECTORY_SEPARATOR</a> constant, using <a href="http://php.net/manual/en/function.realpath.php" rel="nofollow">realpath()</a> function ...).</p> <p>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.</p> <p>Any help would be greaty appreciated, Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload