blob: a8aed416ce09aacba6d33b44f88082cf15fe82a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
function pspice_to_kicad_convert_file()
{
$upload_root_path = pspice_to_kicad_upload_path();
$convert_root_path = pspice_to_kicad_convert_path();
$uploadfolder = arg(3);
$uploadfile = arg(4);
$filenamearray = explode('.', $uploadfile);
$filename = $filenamearray[0];
$filePath = $upload_root_path . "" . $uploadfolder . "/" . $uploadfile;
_convert_run_script($convert_root_path, $uploadfolder, $filePath, $filename, $uploadfile);
}
function _convert_run_script($convert_root_path, $uploadfolder, $filePath, $filename, $uploadfile)
{
//var_dump($convert_root_path . " " . $uploadfolder . " " . $filePath . " " . $filename." ".$uploadfile);
$sh_command = "./run.sh " . $convert_root_path . " " . $uploadfolder . " " . $filePath . " " . $filename . " " . $uploadfile;
exec($sh_command);
}
|