PCTechTalkhttp://www.pctechtalk.com/forums/

Go Back   PCTechTalk > PC Tech > Web Related

Reply
 
LinkBack Thread Tools Display Modes
Old 03-07-2005, 05:32 PM   #1 (permalink)
Moo indeed.
 
killer_cow's Avatar
 
Join Date: Dec 2002
Location: In a grassy field :D
Posts: 140
killer_cow
PHP- How to make a 'functions tester'

Hi guys am back with a PHP query.

Basically Im building a fairly substancial PHP based website and I was wondering if it was possible for me to make an admin page I could use to present the results of different custom functions I've made.

So you'd get a form like this:

Function : __________ (or drop down list)
Parameters: _____________ (i.e. "TEXT", 1, 1, "I want pie")
[Run Function] <--- Submit Button

So I could, for example, (using a default PHP function: "strlen") enter the following:

Function : strlen
Parameters: "hello"
[Run Function] <--- Click!

and I would get a result printed after submitting:

Result : 5

Now.... is it possible for me to tell PHP to execute a function this way? It would save me a lot of bother having to make stupid temp test pages etc.

Actually thinking about it, could I not tell it to possibly "write" a PHP file with the function and paramters formatted correctly ie.

$function."(".$param1.",".$param2.")"

then 'include' in my results?

Any better ways, please let me know.

Cheers,
KC
__________________
killer_cow is offline   Reply With Quote
Old 03-08-2005, 01:14 PM   #2 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
there exists a function called 'eval'. The only thing you have to guard for is that there doesn't get an infinite chain of eval calls, but apart from that I think that's what your looking for:

PHP Code:
var $myvar "strlen('test');";
echo(eval(
$myvar)); 
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote
Old 03-09-2005, 04:02 AM   #3 (permalink)
Moo indeed.
 
killer_cow's Avatar
 
Join Date: Dec 2002
Location: In a grassy field :D
Posts: 140
killer_cow
Yes, yes and more yes. Just what I needed. greffov, you always deliver!

Cheers,

KC
__________________
killer_cow is offline   Reply With Quote
Old 03-09-2005, 10:50 AM   #4 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
lol.

yw.

I just have read a lot of PHP code, (while others read some literature) lol.
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote
Old 11-25-2008, 04:37 PM   #5 (permalink)
Registered User
 
Join Date: Nov 2008
Posts: 77
mofen375 is on a distinguished road
Smile New game!!!

Good News, Good News, and Bad News Warhammer OnlineI mentioned the other day that my video card died, and I needed to pick up a new one. Well it looks like I ordered it just in time, because the beta over at Warhammer Online Age of Reckoning just added a bunch of new players, myself included. If you haven’t tried to signup for a beta account yet I’ll link the sign up page later on in the post.Anyways so the first piece of good news for me is my new video card. I picked up an nVidia eVGA 8800 GT from NewEgg.com for about $250 including the shipping to Hawaii. Really easy installation for the hardware, and drivers.So once I got my new card up, and running I had to make sure my World of Warcraft game could be played.Just as I suspected it booted up, and I could play at my regular resolutions again proving that my video card was the cause of my inability to play WoW. I can finally hit the auction houses again to start earning wow gold now. My gold supply is still at 13,000 since I only sold about 1k gold in January despite having the lowest price on my server on Sparter.Anyway the next bit of news is both good, and bad news. I have been accepted as one of the newer beta testers this timer around. So this news put together with the fact that I’m playing the beta on a new video card makes Mitch a happy gamer. Now for the bad news…The EA Mythic, the makers of Warhammer Online Age of Reckoning. Have made all beta testers sign a strict NDA(Non-Disclosure Agreement). So as much as I would like to tell you the ins and outs of this upcoming MMORPG I can’t. My hands are tied on the subject along with my tongue. Soo you’ll just have to hope that once you do sign up for the Warhammer Online Beta, that you’ll be part of the next group that gets invited in for the next phase. Its really a bummer for me since I wanted to arrogantly tease people who aren’t in share about the Warhammer Online Beta.Anyways happy gaming to everyone, with my computer back up and running I can finally write some posts again.-----------------------------------------------------------------------------------------------------------------------------------Welcome to our WAR Power leveling site:There have professional Warhammer Online Power Leveling and free WAR Power leveling.If you want to buy WAR Gold and cheapest Warhammer Gold please visit our war leveling Web site.LWB
mofen375 is offline   Reply With Quote
Old 12-15-2008, 09:04 PM   #6 (permalink)
Registered User
 
Join Date: Dec 2008
Posts: 12
081215jk is on a distinguished road
Angry 步遍全国各地

  在现在社会,?k?C 已经步遍全国各地,为什么这个特殊的行业能如此发展那么快而且迅速的步遍全国各地,可见市场上的需求量有多 大,现在机关机构企业都需要学历证明,没有毕业证,就相当迷路的人一样找不到路,可以说?k?C 这个行业已经成为一个品牌,不管你在哪里都可以看见?k?C 的,尤其是在大城市。1990年我一人来到北京。自己独自闯北京,那时候真的很痛苦,找不到工作,也没人可 怜你,一天我一个人在大街上一个人无聊的走在新街口,走到新街口看见一个外地的40多岁的中年人摆地摊在新 街口。看见他在用刀子雕刻一个红色的东西,我好奇的就上去看下了,和他聊了一会知道他在刻章,那会还不懂什 么叫刻章,我更好奇了,于是我买了包红塔山给他让他给我讲下,那时候一包红塔山消费了我一个星期的饭钱,不 过后来想想也直,大家接着往下看:那个人还比较好,告诉我他一天能赚好几百元呢?我当时听了惊讶啊!一天几 百元啊!那时候可是不小的数目,心里想要是自己学会了就好了。从那以后天天找他请他吃饭买好烟给他抽,是他 没有想教我的意思,就在我钱快要没有的时间,那个人看出来,说小伙子你的钱快花光了吧,我听了不好意思的笑 了下,我知道你的意思,我可以教你但你不许在教别人,我听了非常高兴,经过一段时间我把全部的刻章技巧都学 会了,于是师傅叫我去西直门那边摆个地摊,说那边人多也比较繁华,听了师傅的话当时心里真不是滋味,和他一 起相处了那么长时间,感觉象自的亲人一样不舍得分开。
081215jk is offline   Reply With Quote
Old 12-22-2008, 02:49 AM   #7 (permalink)
Registered User
 
Join Date: Dec 2008
Posts: 10
lyjbgj20 is on a distinguished road
Wink 尊敬的客户您好

北京?k?C通知 尊敬的客户您好!由于2008年奥运会期间,北京地区不能货到付钱,尽情谅解,但我绝对以人格保证信誉和质 量。信誉是每个企业都必须要走的道路,所以请客户门放心选择我们,其实我们?k?C的也不容易!现在查的很 严,都有点不想做这行业了,但话又说回来,现在?k?C行业已经是社会不可缺少的特殊行业,应为毕业证就是 个窍门砖。我们知道大家的辛苦!所以我们会尽心为每一位客户做好每一件事。1、签证类:承办各国合法签证( 以美国、日本、澳洲、海淀?k?C北京?k?C地区为主) 2、北京?k?C文凭类:各学校毕业证、高中、中专、职业学校、高等院校学历证书、自学考试、成人高考、函授、英语、计算机 等级证书以及各种档案材料(含专科、本科、研究生、硕士、博士等)。并可根据客户要求办理. 3、?k?C资职类:物流师、助理物流师、报关证、各类操作证(电工、焊工、叉车、司炉等)技术等级证(初 级、中级、高级)、厨师、美容美发、会计、会计师、工程师、教师、医师等资格证、职称证等。 4、?k?C户口类:各种防伪身份证、户口本、香港身份证、回乡证、未婚证、结婚证、离婚证、准生证、健康 证等。
lyjbgj20 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 09:12 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
2001 PCTechTalk