Yii Framework Forum: pass value to perl file - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

pass value to perl file Rate Topic: -----

#1 User is offline   neel 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 133
  • Joined: 08-October 09

Posted 24 October 2009 - 06:36 AM

Hello,

How to pass value to perl file? Normal way I ca do in php like this
<form method=post action=test.pl?

Using Yii what is the rule?
0

#2 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 24 October 2009 - 06:40 AM

The same?
0

#3 User is offline   neel 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 133
  • Joined: 08-October 09

Posted 24 October 2009 - 07:02 AM

Not same. Bcz when browser call the pl file, it says "Do you want to open or save the file?" Without yii, no problem to see the passing value. Let me know if you have any answer.
0

#4 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 24 October 2009 - 07:33 AM

Start with plain html (it works for me)
<form method="post" action="/cgi-bin/printenv">
or
<form method="post" action="/cgi-bin/retrieve.pl">


then if you want, you can try
<?php
 echo CHtml::beginForm(Yii::app()->urlManager->baseUrl.'/../cgi-bin/retrieve.pl');
 ...
 ...
 echo CHtml::endForm();

?>


Edit:
Should work with plain html controls generated from the Yii class CHtml. Check what's sent to your browser.

/Tommy
Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
0

#5 User is offline   neel 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 133
  • Joined: 08-October 09

Posted 24 October 2009 - 08:59 PM

Bingo!!!!!!!!!!!!!!!!!!!!!!!!
Working. THanks Buddy.
:)
0

#6 User is offline   neel 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 133
  • Joined: 08-October 09

Posted 25 October 2009 - 08:17 AM

Hello,
Now I can pass the value to perl(.pl) file. But the problem is, page is showing in http://abc.com/test.pl. I want the page in yii, like http://abc.com/site/test. Is there any way to do this.
THanks
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users