• I have a php script that will generate a text file based on the post ID passed into it. I have it set so that it will run when a user publishes a post, I know this is functioning because if I screw up my script an error results while publishing a post. The problem is that it is not generating the text file like I want and I can’t figure out why not. The script on it’s own(if I just enter the address in my browser), works just fine and generates the text file. But when it runs from the publish action(no errors) no text file is generated, or atleast the text file did not show up where I intended.

    Does anyone have any idea why this is occurring? If running from a publish hook, does it do something special to disable file generation? or does it put it somewhere that overrides my target location?

Viewing 2 replies - 1 through 2 (of 2 total)
  • code or it didn’t happen.

    Thread Starter HeroicNate

    (@heroicnate)

    despite the rude reply I figured it out. Turns out it runs out of the wp-admin folder and that’s where it saves files by default. Now that I know the base folder I can tell it where to save the files accordingly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Call php to generate file on user publish post?’ is closed to new replies.