Search found 14 matches
- Thu May 31, 2007 3:30 pm
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
Why can't you just use the icon? The fact is I can and probably will end up using the icon. What I meant was that I won't be trying any scripts to do it for me. So you are literally trying to replace the text string '(pdf)' with an image of a pdf icon? In the markup? Why not ctrl-h in the project a...
- Thu May 31, 2007 2:46 pm
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
Perhaps you could have a file called 'addition-pdf.txt' and in it you could have the string '(PDF)' (which I am still uncertain as to why you did this to begin with) The reason I did it is that I am developing a website and we have a lot of pdf files on it. According to what I have read, (and my ow...
- Thu May 31, 2007 2:15 pm
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
- Thu May 31, 2007 11:35 am
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
That worked for the string replacement. Unfortunately I use several requires that I use in my site. Using this method they don't get displayed. I'm thinking that php just may not have what I am looking for here. Javascript might be better suited to this task. What do you think?[/url]
- Wed May 30, 2007 11:12 pm
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
- Wed May 30, 2007 6:19 pm
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
- Thu May 24, 2007 6:30 pm
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
- Thu May 24, 2007 4:10 pm
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
Okay, so using a local file path I am able to open the page to read. I don't fully understand this as using a URL works for an external website. Would someone be able to explain that to me? Anyway, using this method I end up echoing the entire page. What I want to do is just replace a particular str...
- Thu May 24, 2007 2:31 pm
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
According to the PHP Manual file_get_contents is restricted by open_basedir. That's what the error was referencing. However, open_basedir is set to allow me to open from my /httpdocs folder. Shouldn't that allow me to open any file in my website?
- Fri May 18, 2007 4:53 pm
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
- Fri May 18, 2007 2:38 am
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
- Thu May 17, 2007 4:36 pm
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
I used $_SERVER['PHP_SELF'] and got that error. I have other PHP scripts that run from that same folder. None of them are very complex but that shouldn't really make a difference for this should it? Here is the exact script that gives that error: <?php $resource = file_get_contents($_SERVER['PHP_SEL...
- Thu May 17, 2007 2:05 pm
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
- Thu May 17, 2007 12:48 pm
- Forum: PHP - Code
- Topic: Replace text in html page at load [Solved]
- Replies: 29
- Views: 4788
Replace text in html page at load [Solved]
I am trying to make a script that will allow me to replace a specific string in an html page when it loads. specifically at the moment what I want to do is replace (pdf) with a link to a pdf icon when the page is loaded. I am pretty sure this is possible, but I don't really know where to start. I di...