No '..' components allowed in path
Posted: Thu Nov 06, 2003 8:17 am
Hello I get this errormessage:
Warning: No '..' components allowed in path in D:\Inetpub\Hotel\kinnanc136qnke\dok2000kopia\pdf_d
irekta\golv&tak\pdf.php on line 9
when running this code:
<?PHP
ini_set("display_errors", "1");
function myspawn($pdf, $bild, $nypdf)
{
$command="..\\..\\exe\\pdf.exe $pdf ..\\..\\af_bilder\\$bild $nypdf";
exec($command);
exec("exit(0)");
}
?>
<html>
<head>
<title>New Page 1</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>
<body onLoad="MM_goToURL('parent','pdf.pdf');return document.MM_returnValue">
Skapar pdf..
<? myspawn($_GET['pdf'], $_GET['bild'], $_GET['nypdf']);?>
</body>
</html>
It execute an .exe that switch some bytes in a pdf-file and then saves it to a new location..
When safe_mode = Off everything works just fine..
But it will be hosted on a webhotel that wont allow safe_mode = Off so I have to get it to work with safe_mode = On
Anyone know whats the problem?
Thanks!
Warning: No '..' components allowed in path in D:\Inetpub\Hotel\kinnanc136qnke\dok2000kopia\pdf_d
irekta\golv&tak\pdf.php on line 9
when running this code:
<?PHP
ini_set("display_errors", "1");
function myspawn($pdf, $bild, $nypdf)
{
$command="..\\..\\exe\\pdf.exe $pdf ..\\..\\af_bilder\\$bild $nypdf";
exec($command);
exec("exit(0)");
}
?>
<html>
<head>
<title>New Page 1</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>
<body onLoad="MM_goToURL('parent','pdf.pdf');return document.MM_returnValue">
Skapar pdf..
<? myspawn($_GET['pdf'], $_GET['bild'], $_GET['nypdf']);?>
</body>
</html>
It execute an .exe that switch some bytes in a pdf-file and then saves it to a new location..
When safe_mode = Off everything works just fine..
But it will be hosted on a webhotel that wont allow safe_mode = Off so I have to get it to work with safe_mode = On
Anyone know whats the problem?
Thanks!