2

I am trying to use the exec command in centos:

exec(Yii::getPathOfAlias('application').'\yiic SendNow '.$sendID);

this does not work in centos but this work in windows

Headway
  • 55
  • 6

1 Answers1

2

Windows paths use a backslash separator; unix paths use a forward slash.

Sam Dufel
  • 17,560
  • 3
  • 48
  • 51
  • You can use forward slash for both system or use the DIRECTORY_SEPARATOR constant. – Vitaly Jul 25 '13 at 05:48
  • @user2431202, any error message? @Vitaly Actually `DIRECTORY_SEPARATOR` is provided for path parsing purposes, it is completely unnessesary to use it to read or exec a file, so just always use `/` –  Jul 25 '13 at 06:43