Jump to content

nkoronka

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nkoronka's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi there, I wonder if anyone can help me. I'm trying to install smarty. The problem I'm having is in choosing the correct path directory for- require('/usr/local/lib/php/Smarty/Smarty.class.php'); Granted I am relatively new to coding. I've tried using- <?php echo $_SERVER['DOCUMENT_ROOT']; ?> which returns- /usr/local/apache/htdocs I think the problem is in understanding what my local directory is. In my ftp program, the first folder looks like this firstfolder/ public_html/ ( < I've installed smarty in this one) DO_NOT_UPLOAD_HERE.txt When I run a test file index.php, I get the following error- Warning: require() [function.require]: open_basedir restriction in effect. File(/usr/local/public_html/lib/php/Smarty/Smarty.class.php) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/a4808331/public_html/index.php on line 4 What I've put in my index.php file so far which I'm sure is wrong is- require('/usr/local/public_html/lib/php/Smarty/Smarty.class.php'); If you need more info I'd be happy to supply. Thanks in advance for your help.
  2. Thanks, that's a great help!
  3. Am I right in thinking that I include that line in my code? Would I also need to have the file in the same folder as the code I'm running or is it something included in my webhosts version of PHP? Thanks again for your help.
  4. good idea, I'll get onto it. Cheers,
  5. Quite right, ok here's the error and code- Fatal error: Call to a member function find() on a non-object in /home/histo760/public_html/findlinks.php on line 10 <?php // Create DOM from URL or file $html = file_get_html('http://www.google.com/'); // Find all links foreach($html->find('a') as $element) echo $element->href . '<br>'; ?> Cheers
  6. Hi there (first post), I'm trying to learn how to manipulate html with PHP and DOM. I'm fairly new to this. The problem I seem to be having seems to be server related. I've spoken to the support people and they say they don't support simple html DOM and so when I try to call- file_get_html() fatal errors occur. I wonder if someone could point me in the right direction here- are there any available hosts that will support simple html DOM? Any advice appreciated. If you need more info let me know. Thanks in advance.
×
×
  • 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.