I have a very strange problem that got me stuck..hoping someone here can enlighten me what went wrong. Below is my code snippet and the output:-
[code=php]
<?php
require(“header.php”);
session_start();
require(“db.php”);
if (isset($_POST[“submit”]))
{ $lib = “/”.$_POST[“SVGLibraries”];
echo $lib.”<br><br>”;
$predir = $svgdir.$lib;
echo $predir.”<br/> Test 0 <br/>”;
$predir = $predir.$lib;
echo $predir.”<br/> Test 1 <br/>”;
$filename = $predir.”.svg”;
echo $filename.”<br/> Test 2 <br/>”;
$svgfile = fopen($filename, ‘w’);
if( $svgfile == FALSE )
{
echo “File Error! Please report this to the website administrator”;
}
else
{
// DO something
}
}
?>
Output in the Browser:
[code=html]
/IHM039frV2
http://qlap04/db/SVG/IHM039frV2 Test 0
http://qlap04/db/SVG/IHM039frV2 Test 1
http://qlap04/db/SVG/IHM039frV2 Test 2
Warning: fopen(http://qlap04/ciadb/SVG/IHM039frV2</option/IHM039frV2</option.svg) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /usr/local/apache2/htdocs/ciadb/wgiv.php on line 22
File Error! Please report this to the website administrator
Why does my assigment to combine the variables only worked the first time? Where did the ‘/option’ come from?
Thanks to anyone who can enlighten me on this.