Re: PHP Reference

From: Date: Sat, 14 Aug 2010 10:50:26 +0000
Subject: Re: PHP Reference
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-307466@lists.php.net to get a copy of this message
On Aug 14, 2010, at 5:19 AM, Ashley Sheridan wrote:
On Sat, 2010-08-14 at 01:57 -0500, Karl DeSaulniers wrote:
That is what I thought. Thank you for confirming. Karl On Aug 14, 2010, at 1:54 AM, Peter Lind wrote:
On 14 August 2010 08:08, Karl DeSaulniers <karl@designdrumm.com> wrote:
Hello all, I was wondering, can you reference php in a url string like you
can
javascript. EG: "javascript:someFunction()" Can you do something similar in php like "php:someFunction()" I am thinking that you can not do this, but was wondering if there was something like that. Thanks,
No, you can't. Regards Peter -- <hype> WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 </hype>
Karl DeSaulniers Design Drumm http://designdrumm.com
The reason you can't is because PHP is on the server and Javascript is local (e.g. the browser). Even if the PHP code you're executing is through localhost, because PHP needs the server to run, it has to be run on the server, and exposing functions directly like this would expose all sorts of security issues (imagine calling up a getUserDetails() on a website you're not logged into for example, which would mean every function of a system would need some sort of user auth check and would slow the whole thing to a crawl) Thanks, Ash http://www.ashleysheridan.co.uk
I see. Very good point. Thanks Ash. I figured it was because of the whole pre-processing part of PHP. Thanks for the explination. Best, Karl DeSaulniers Design Drumm http://designdrumm.com

« previous php.general (#307466) next »