How do you code a file_get_contents into a writeIn please ?
Trying to code a php include into a js script, but it's not working ? Not sure why ? The relevant section is below. Is the php code 'escaped' properly ?
If that's what's appearing on your generated page after uploading it to a server, then your server isn't parsing PHP. Are you sure your server is set up to run PHP code?
Spudhead's point is that if you're seeing PHP tags and anything inside them in a "view source" on a live page, PHP is, in fact, not working correctly. A link would be useful. More code might be helpful.
Yes, but I just noticed this from your original post:
Quote:
Trying to code a php include into a js script
Does this mean that the line of code in question is in a something.js file? And then the something.js file is used in a page with the standard <script type="text/javascript" href="something.js"></script>? The requested link or more code would have helped to identify this quickly.
If that's the case, then it's not going to work. The javascript in the href will be loaded by the browser and won't be touched by the server, which means it won't be treated as php - to a javascript engine, it's just text.
Thanks Tom, that's what I feared really, but was trying to be optimistic
OK, how would the others here do this :
If you had a particular website page with 1,000's of words on that page and there was one paragraph on it, that when I updated that particular paragraph, it automatically updated all other peoples websites, that had already wanted the updated paragraphs on their website and had already installed code on their websites for this to happen.
Keeping everything as simple as possible for the other website owners, and so that they couldn't tamper with the paragraph in any way, how would the members here do that please ?
You mention "so that they couldn't tamper with the paragraph in any way". If it's their site, they can manipulate the data stream from your site in any way they want. There's no way to control this, except perhaps for converting the text to an image. If that's not really what you mean, there could be other options.
You mention "so that they couldn't tamper with the paragraph in any way". If it's their site, they can manipulate the data stream from your site in any way they want. There's no way to control this, except perhaps for converting the text to an image. If that's not really what you mean, there could be other options.
What I mean by this, is that they would have options on where on their site to place the paragraph, but no options to edit the paragraph.
What I mean by this, is that they would have options on where on their site to place the paragraph, but no options to edit the paragraph.
Any other possible solutions ?
I've never done RSS, so I don't know what's involved.
You still didn't clarify your what you mean by "tamper" except to rephrase it as "edit". Is it your intent that clients should not have the ability to modify this content you provide?
If the content you're providing is just a stream of text (which includes HTML), it's impossible to disallow "tampering".
I thought I had clarified, but simply, it would work in the same way as php includes, the receiving site can change where the include goes, but can't tamper with the text itself.
Anyways, bearing this in mind, and seeing now, that between 5-10% (depending on the stats looked at!!), of users have their js turned off, I need to look at other options now.