开发者

copying php page and edit it

I'开发者_C百科m not sure what my next step should be so I would really appriciate if someone could point me in the right direction. What I want to do is to be able to edit a php-page for example 'Pressmeddelande.php' found in: http://newsletter.something.se/nyhetsbrev/Pressmeddelande/Pressmeddelande.php

in my admin page found at http://www.something.se/editPressmeddelande.php. My admin page consists of a WYSIWYG and this is where I would like the code from the newsletterpage to end up so I can edit it and then save a copy of it in my db.

So basically, my question is how do I go about copying the page into my my WYSIWYG.

Many thanks Linda


It's a bad idea (to have ability to edit php script from front-end interface), but, well, you can use either fopen('/path/to/file', 'r') + fread + fclose or file_get_contents to get file contents


What i understand is that you want the contents of an external page. You want to slurp it in. You could use the fopen function and provide an url as filename: see http://php.net/fopen

The contents of the page will be loaded in a variable, which you can parse and save or directly save in the database.

Is this what you are looking for?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜