Problem to open / import file in textarea (SOLVED)

proseox

New member
On localhost webserver its working , in exe file it isnt.

I can import textfiles and show them in a textarea with the following code:

My readfile.php
Code:
 <form action="index.php" method="POST">
	  <input name="file" type="file" />&nbsp;&nbsp;&nbsp;<input type="submit" value="Import File" />
	  </form>
My showfile.php contains this
Code:
        <textarea name="txtscript" id="txtscript" cols="45" rows="15"><?php echo htmlspecialchars($script); ?><?php $filename = $_POST'file'];  $file = fopen($filename, "r"); echo htmlspecialchars(fread($file, filesize($filename))); fclose($file); ?></textarea><br />
on localhost i have no problems but in the exe the textarea is empty
 
Last edited:
The POST method has some problems in ExeOutput 1.5 with Chromium. Have you tried the v1.6 Beta?
 
Last edited:
I have tested now with trident and it is not working too. If i import a file which is compiled too the import works, but if i take a other file it doesnt work.

Is there a need to write something in the scripting box like for export / saving files?
 
Last edited:
OK. If anyone needs this too…

I import a script and put the content to a textarea.

UserMain Scripting
Code:
function OpenDlgFile: String;
begin
Result := OpenFileDialog("Select a File to open", "*.*", "*.*", "All files (*.*)|*.*", "");
end;
My PHP file contains this
Code:
      <?php 
	  echo '<a class="Buttonlookalike" href="index.php?name=import">Import</a> '; 
	  if ($_GET'name']=="import") { 
	  $filename = exo_return_hescriptcom("UserMain.OpenDlgFile", "Error");
  	  $import = file_get_contents($filename);
      }
  	  ?>
<textarea><?php echo htmlspecialchars($import); ?></textarea>
 
Last edited:
Back
Top