I am in the process of replacing out a Yii form in Yii 1 with just a regular php form.
The problem I am having is that, I can’t figure out where Yii is looking for the file when put it in the form action.
Right now I have the php file to process the form in the same folder as where the view is being stored. Where should I put the form processor php file so that Yii knows where to look for it?
So contact.php is NOT a Yii file and you want to submit the form to it?
With what you have now, the browser will submit the form to “.../path-to-your-form-controller/contact.php”. As the path/directory doesn’t exist physically, you can’t put your file there.
If you used "/contact.php" as your action, the browser would look for the file in the root of your domain.
Right, contact.php is not a YII file just a vanilla php file for email processing.
How can I set it up to say put it in the controllers folder and access it? I tried ‘../../controllers/contact.php’ but it can’t find the file. I’d like to put it in a folder so it can’t be accessed by the public instead of using /contact.php in the root.