Jump to content
php.lv forumi

Cron


euphoric

Recommended Posts

Nu es caur cPanel eju, man tur ir janorāda laiks, cik bieži un zemāk ir inupt's kurā jaieraksta komanda.

Priekš lokāliem failiem norādiju tā :

 

php path/to/php/script.php

 

Un viss notikās.

 

tagad man šis scripts nav uz lokālā servera domāju tā 'prokatit', bet vīlos.. :

 

php http://myserver/script.php'>http://myserver/script.php

 

Mēģināju arī tā :

 

php path/to/php/script.php

 

kur iekš script.php ir header('location: http://myserver/script.php'>http://myserver/script.php');

Link to comment
Share on other sites

ar header() tu nosūti lietotāja pārlūkam komandas, kas tam ir jāizpilda ('location: /path') gadījumā, lai lietotāja pārlūks ver to jauno adresi.

Ja tu ver to php skriptu caur komandrindu (kā tas notiek "php path/to/script.php"), tad nekāds pārlūks tur nav, attiecīgi tas arī nevar izpildīties.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...