我创建了一个 PHP 脚本来创建一个文本文件。当我第一次开始时,它只需要在与 php 文件相同的目录中创建。现在我需要在脚本下方的子文件夹中创建它。由于某种原因,该脚本无法正常工作。谁能看到我的错误?我已经阅读了周围,没有地方。如果这有所不同,它会托管在网络服务器 atm 上。脚本返回内部错误 500 atm
谢谢
<?php
$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);