Jump to content

blueman378

Members
  • Posts

    888
  • Joined

  • Last visited

    Never

Everything posted by blueman378

  1. basically you have to pass it the string you want it to run on. (didnt mean to sound harsh jut explaining the reason why you were not getiing any more help, no code = no help as a general rule) but anyway try this differnt to yours cause its not using an array but hey if it works <?php $rewrote = ""; $handle = fopen("C:\Users\Mike\Desktop\AthyDB.txt", "r+"); // Open file to read it read. if ($handle) { while (!feof($handle)) // Loop til end of file. { $currentline = fgets($handle, 4096); // Read a line. $currentline=preg_replace('^D','Dail European Parliament and Local Elections only', $currentline); $currentline=preg_replace('^S','Post or special arrangement only', $currentline)); $currentline=preg_replace('^L','Local Elections only', $currentline)); $currentline=preg_replace('^E','European Parliament and Local Elections only', $currentline)); $rewrote .= $currentline; $rewrote .= "\n"; } file_put_contents('C:\Users\Mike\Desktop\test.txt'); fclose($handle); } ?> Please make a backup of your file first as this is untested and may create unintention bugs.
  2. Hi there, ITs a pretty simply idea. In your template have regoins specified, eg <DOCTYPE blablabla... > <head> <meta description="keywords" content="[keywords here]" > <title>[Title here]</title> ... </head> <body> <div class="header">[Title Here]</div> <div class="textleft">[user text here]</div> <div class="image1right"><img src="[image1source]"></div> <div class="image2right"><img src="[image2source]"></div> <div class="footer">© [title here] 2009 </div> </div> </html> you would then read the file use regex to replace the values then save the file Too a different name!
  3. The thing is you are asking us to code the whole thing for you without showing any attempt at doing it yourself. You will not be given more help unless: a) you post in the freelance section b) you atleast attempt to wrote it yourself then come back when you have a problem. Matt
  4. Hi guys, is it possible to load a page that is cached with php. i,e i have a website that changes everytime you reload the page, but when you press back it loads the cached copy, is there any way to load that from php using localhost?
  5. hi mate, I *think* this is correct but if you go class authorize extends error { //blablabla } you should be able to access all the methods of your error class, asif it was the same class so in authorize you might have $this->displayErrors() i think thats right lol SOMEONE correct me please
  6. Cheers, anyone have any idea how deviantart.com do it then if you upload an image a browser cannot display it will be converted to jpg on the fly. they also use php.
  7. Hi guys, I was wondering if someone could tell me how powerful the gd library is in terms of conversion, eg i need to: convert .tiff to jpg convert bmp to jpg convert svg to jpeg, basically any image formats that the browser cannot display or are to big to be ligically displayed i am looking to convert, can the gd library convert all these?
  8. Hi mate, Well looking around there are a few broken links. Eg code, your 404 page the suggested link shows http:/// i really dont like the javascript popup on the 404 page, the page itself is neat but the javascript popup... remove it. Infact looking through none of your links work, have these pages not been created yet or is your htaccess not working? do you need another developer for this project by any chance because the project looks neat?
  9. HI mate, Nice little script there, Ill have a look at it for ya. theres a few things i can add in for you. EG if the mail function fails, try sending via smtp, make it a little bit easier to update... OOP is great. ill update the list bit later.
  10. well youll have to use regex to read through the post and convert it to html, its your choice if you do this before you put it into the database or after, but regex is the way to go, with regards to the SMF database structure, it may seem akward, its not. its simply practical. once you get some more experience with database go look over the structure again and youll see what i mean.
  11. Hi guys, well like the title says thats what im looking for, but the best, size isnt really an issue for me, im used to using wamp however that doesnt like flash drives.
  12. although entertaining if the right songs are played... buring ring of fire on a funeral website?!?
  13. and even if you did get the session idea to work, it would still pause between page loads.
  14. lol thats what i did on the very first site i built the music frame had no size at all.
  15. @corbin its not just wamp, alot of the windows updates simply replace the hosts file, for example the very first update for office 07 adds in an entry by replacing your hosts file with its own (i think the office one is fixed now but you get the idea)
  16. im not saying they dont use java but im saying they must have some form of serverside protection?
  17. that cant be right, i mean banks stop you from refreshing a page or going back all the time, surly thats not just client based?
  18. Hi dude dont freak, Check in your hosts file to see if there is a entry like this: 127.0.0.1 localhost if there is a # before it like this # 127.0.0.1 localhost delete the hash as that is a comment you will find your host file at: C:\Windows\System32\drivers\etc open with notepad
  19. well no what i think its meant to be is <img src="http://localhost/extremehairextensions/shop/avactis-templates/catalog/product-info/default/%22images/add_to_cart_button.gif%22" alt="" onclick="ProductFormSubmit_36()" style="cursor: pointer;" width="96" border="0" height="18">
  20. XD cheers mate, although i posted here because it is semi php related as i got confused as to what the path should be because of it being included.
  21. Have you got error reporting turned on? put ini_set('display_errors', 1); error_reporting(E_ALL); at the top of your page
  22. Hi guys, well i have something like this: WWW -index.php --PHOTO ---photo_head.php ---index.php ---IMAGES ----bg.gif ----another.gif ---CSS ----style.css you get the idea. anyway the index.php in WWW loads different pages based on variables, and if it gets a variable called photo it loads photo_head.php into the head section of the index page and the second index page into the body of the first. so the photo_head.php contains a link to the style.css with photo/css/style.css but where im getting confused is where do i set the image urls in the css to if i want them to point to the IMAGES directory? cheers
  23. wow i think thats more annoying than just not using code tags, please just put the whole lot in a code block, anyway please be more specific what do you mean by it doesnt work
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.