Welcome Guest, Not a member yet? Register   Sign In
Passing in URL as parameter in CLI
#1

(This post was last modified: 04-05-2015, 06:22 PM by albertleao.)

Hello. I'm using CI 3.0 as a backend only system to handle some tasks.

I'd like to run a few controllers with the CLI via cronjobs but I'm having an issue passing in a URL as a parameter. So my controller function looks something like this:


PHP Code:
runProcess($url) {
  
//Do something with URL
  
echo $url;

but when I pass in a URL such as : 'https://aws.amazon.com/queues/1234/foo', I will only get the data before a forward slash. For example, running: 'php index.php Controller runProcess 'https://aws.amazon.com/queues/1234/foo' will echo 'https:'. If I remove the https from the original call it will return 'aws.amazon.com'.
Any ideas on how to pass in a full URL?
Reply


Messages In This Thread
Passing in URL as parameter in CLI - by albertleao - 04-05-2015, 06:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB