Derek Hutchinson
-2
php
我已经创建了一个PHP脚本来创建一个文本文件.当我第一次启动它时,只需要在与php文件相同的目录中创建它.现在我需要创建在脚本下面的子文件夹中创建它.由于某种原因,脚本无法正常工作.任何人都可以看到我的错误吗?我已经读过并且没有在哪里.如果有所不同,它将托管在Web服务器atm上.脚本返回内部错误500 atm
谢谢
$filename = $_GET['jobname'];
$area = $_GET['area']
$sunits = $_GET['s'];
$wunits = $_GET['w'];
$funits = $_GET['f'];
$vunits = $_GET['v'];
$tunits = $_GET['t'];
$junits = $_GET['j'];
$kunits = $_GET['k'];
$lunits = $_GET['l'];
$yunits = $_GET['y'];
$punits = $_GET['p'];
$t2units = $_GET['t2'];
$k2units = $_GET['k2'];
$munits = $_GET['m'];
$data = "S: $sunits - W: $wunits - F: $funits - V: $vunits - T: $tunits - J: $junits - K: $kunits - L: $lunits - Y: $yunits - P: $punits - T2: $t2units - K2: $k2units - M: $munits";
$handle = fopen("/Jobs/$area/$filename.txt", 'x') or die('Cannot open file: '.$filename); //implicitly creates file
fwrite($handle, "\n" . $data . "\n");
fclose($handle);