English 中文(简体)
Edit text from thephp document
原标题:Edit text from php document

我有这份题为:pdf5.php的文件。

在该文件中,我有以下几条:

$pdf->setSourceFile( h.pdf ); 

我想能够用手法或文字编辑 h.pdf


问题在于,我要这样做:

我还有另一份称为编辑的网址文件。 php

这些投入

<input type="text" value="h.pdf" /> <br>
<input type="text" value="" /> - Lets say the user puts: **f.pdf**
<input type="submit" name="submit" value="Modify" />

用户点击Modification, The -h.pdf- from -pdf5.php- change to -f.pdf-

如:$pdf->setSourceFile( f.pdf);


我认为,我发现一些类似之处,但只是 page上同一页,它有意让用户加以修改。

Java

  <script type="text/javascript">
  var str="Visit Microsoft!";
  document.write(str.replace("Microsoft", "hello"));

so any ideas??? I dont know if I am making myself clear enough... ?? thnx in advanced..

最佳回答

您必须寄送您的表格(最好使用POST),并以该变量作为参数用于$pdf->setSourceFile

<form method="POST" action="…">
   <input type="text" name="old" value="h.pdf" /> <br>
   <input type="text" name="new" value="" />
   <input type="submit" name="submit" value="Modify" />
</form>

和PHP:

$newvalue = $_POST[ new ]; // but: always do some sanity checks!!!
$pdf->setSourceFile($newvalue);

正如已经说过的那样:总是检查作为用户投入而得到的数值(例如,使用一张桌子) < 供用户使用!

问题回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签