Post php and javascript

0

Good afternoon.

The case is currently as follows. My javascript application with angular will receive a post from a php application, for this I am asked for a url. That url has a similar format: link , however, upon receiving the post, an error appears saying ' can not post 404 (not found) ', so I tried the url of a webservice instead of the url of the view.

I thought about receiving the post that is made from a php application (it will send me some data) in a javascript function (I have to provide a url). Is it possible to do a php post and that a javascript function receives it ?, could you provide me with an example?

If not, what could I do? Thanks

    
asked by Blanca 17.08.2017 в 20:03
source

1 answer

1

After the comments, the error is because PHP is on an external server so it can not access your localhost . You must publish your javascript code and point from the php to that url.

    
answered by 17.08.2017 в 20:10