peljuu Posted April 2, 2011 Share Posted April 2, 2011 Hi guys! I'm new to PHP and I'm using Drupal and there's a function that one block will be called if PHP scripts returns value TRUE. Now I want my "Search" to only show at ALL THE other pages but not index. With the code: if (Url::exists('http://www.example.com')) I get my Search function to return TRUE so it will be showed on index page only, but not on any other pages!! So I kinda need this on reverse - how do I get a TRUE value for something that excists? In this case it would be www.example.com, or if anyone else has any other ideas I would be very thankful! Quote Link to comment https://forums.phpfreaks.com/topic/232488-need-to-return-false-with-specified-url/ Share on other sites More sharing options...
yozyk Posted April 2, 2011 Share Posted April 2, 2011 You want to check remote url? Quote Link to comment https://forums.phpfreaks.com/topic/232488-need-to-return-false-with-specified-url/#findComment-1195849 Share on other sites More sharing options...
peljuu Posted April 3, 2011 Author Share Posted April 3, 2011 Nope, I just need to somehow get PHP function to return TRUE for only 1 page with some technique, and I thought that would be the easiest one but it works in reverse.. :/ Quote Link to comment https://forums.phpfreaks.com/topic/232488-need-to-return-false-with-specified-url/#findComment-1196195 Share on other sites More sharing options...
yozyk Posted April 4, 2011 Share Posted April 4, 2011 if (Url::exists('http://www.example.com')) Where do you get this code? Drupal has api for url processing. Quote Link to comment https://forums.phpfreaks.com/topic/232488-need-to-return-false-with-specified-url/#findComment-1196651 Share on other sites More sharing options...
dcro2 Posted April 4, 2011 Share Posted April 4, 2011 I think we're all very confused with your request... Quote Link to comment https://forums.phpfreaks.com/topic/232488-need-to-return-false-with-specified-url/#findComment-1196652 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.