divadiva Posted January 14, 2009 Share Posted January 14, 2009 Experts Please help me with this.I am stuck with a problem. I have this : //Basiclaly this is my url www.xyz.local/index.php?entryPoint=removeme&identifier=161f9f7f-1e73-1902-3930-49661416835e //All I want is to pass entryPoint and identifier.I thought of using $_GET but it doesnt work right. $fileDir = "http://www.xyz.local/"; // supply a path name. $fileName = "index.php."; // supply a file name. $fileString = $fileDir.'/'.$fileName.'/'.$_GET["entryPoint"].'/'.$_GET["identifier"]; // entry point and identifier is the additional string attached.I want to pass this string to if(!$fdl=@fopen($fileString ,'r')) Any help will be appreciated. Best Regards Divya Quote Link to comment https://forums.phpfreaks.com/topic/140863-solved-how-to-use-_get-in-php/ Share on other sites More sharing options...
darkfreaks Posted January 14, 2009 Share Posted January 14, 2009 please copy the exact error you are getting Quote Link to comment https://forums.phpfreaks.com/topic/140863-solved-how-to-use-_get-in-php/#findComment-737295 Share on other sites More sharing options...
dennismonsewicz Posted January 14, 2009 Share Posted January 14, 2009 http://www.w3schools.com/PHP/php_get.asp Quote Link to comment https://forums.phpfreaks.com/topic/140863-solved-how-to-use-_get-in-php/#findComment-737296 Share on other sites More sharing options...
premiso Posted January 14, 2009 Share Posted January 14, 2009 $fileDir = "http://www.xyz.local"; // supply a path name. Since you add an ending slash in the $fileString, do that. Also echo out the $fileString to make sure that path is being populated right. Some debugging would have caught that. ALso this line: $fileName = "index.php."; // supply a file name. Should be: $fileName = "index.php"; // supply a file name. No ending period. What is the end result that you want from $fileString? Like how should that string look? Quote Link to comment https://forums.phpfreaks.com/topic/140863-solved-how-to-use-_get-in-php/#findComment-737298 Share on other sites More sharing options...
divadiva Posted January 14, 2009 Author Share Posted January 14, 2009 Thankyou for replying I want to check whether this is right: $fileString = $fileDir.'/'.$fileName.'/'.$_GET["entryPoint"].'/'.$_GET["identifier"]; If I only use this it works as link is there(entryPoint and identifier is the attached string ie ww.xyz.com/entryPoint&identifier $fileString = $fileDir.'/'.$fileName This is the error. Cannot open the page Quote Link to comment https://forums.phpfreaks.com/topic/140863-solved-how-to-use-_get-in-php/#findComment-737299 Share on other sites More sharing options...
divadiva Posted January 14, 2009 Author Share Posted January 14, 2009 Thankyou PREMISO that really helped. Quote Link to comment https://forums.phpfreaks.com/topic/140863-solved-how-to-use-_get-in-php/#findComment-737302 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.