Jump to content

Henaro

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Everything posted by Henaro

  1. Hey everyone~ I just set up my own L.A.M.P. server. No problems installing and setting up everything. But I am having trouble getting some of my PHPscripts to work. First is I am getting Permission Denied errors when writing to files and making directories. I looked it up and found the chmod command. I've pretty much chmod'd all of my php scripts to 777 but I still get the Permission Denied errors. I've even chmod'd the directories containing the scripts. Please help. Thanks ~Henaro
  2. Henaro

    Regex help.

    Hello everyone~ I am having trouble with regex. I've spent about 2 hours trying to figure out and now my head is killing me. So anyways, what I want done is have the user input something like: >>741 And have it change to something like: <a href='index.php#741'>>>741</a> So far, after reading the tutorial here and some forum posts I have this: <? ... $view_post = preg_replace("/(>>)([100-999])/","<a href='index.php#$2'>$1$2</a>",$view_post); ... echo $view_post; ?> The 100-999 is supose to be any character between 100-999 after the >>. I'm not sure what I am doing wrong but it seems as though it outputs: <a href='index.php#7'>>>7</a>41 I'm stumped Please help. Thanks, Henaro
  3. Wow thanks for the speedy reply.  It works good now.  Thanks :D
  4. Hello!~ I have encountered an error and I am in need of help.  Here is there error: [code]Resource id #4[/code] Here is the code that is producing it: [code]<?PHP $view_post = fopen ('posts.txt', 'rb'); $view_post = str_replace(' [ascii] ', '<pre>', $view_post); $view_post = str_replace(' [/ascii] ', '</pre>', $view_post); printf("$view_post"); ?>[/code] I am not sure what Resource id #4 is.  I google'd it and found a lot of stuff about MySQL, but I am not using MySQL.  If anyone could tell me what is wrong with this please do. Thanks, Henaro
×
×
  • 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.