Jump to content

southampton_web_designer

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by southampton_web_designer

  1. Hi, Thanks for your reply. I can't use plugins because I need to query database from outside of blog directory. Blog is installed in subdirectory. If use any of the functions given in plugin, it is giving php error. I can't even use wordpress functions, in that case also it is giving error. Mmy php code will go in index.php file lying in root directory. Thanks
  2. Hello, I have a website designed in simple php http://www.fsbizcollect.com/. It has a wordpress blog installed under sub-directory called "business-debt-collection-agency-blog" To query posts from blog on home page, I am using: <? foreach($sql->select("wp_posts", "where post_status = 'publish' order by post_date desc limit 3") as $row){ ?> <div class="bEntry"> <h2><?= $row['post_title'] ?></h2> <h3><?= date('F j, Y', strtotime($row['post_date'])) ?></h3> <p> <?= $row['post_excerpt'] ?> <a href="<?= $row['guid'] ?>">Read More</a></p> </div> <? } ?> It is working fine. I want to put post thumbnails on homepage. Post thumbnail should be automatically resized to width=110px and will be placed in : <div class="blogThumb"> POST THUMBNAIL PHP SCRIPT WILL COME HERE </div> Could anyone provide php script for this? Thank you
  3. Ok Guys, Problem is solved. Solution is: require_once('/home/username/public_html'.'/views/layouts/'.$controller.'.php'); in index.php Actually my site is on a free webserver and probably that's why this was required: '/home/username/public_html' Anyway many thanks for your help.
  4. Yes file do exists. But jobs.php has a code: <?php require('/views/'.$controller.'/'.$view.'.php'); ?> and $controller is 'jobs' and $view is one of the options of case statement.
  5. When I used require('/views/layouts/'.$controller.'.php'); the error is Fatal error: require() [function.require]: Failed opening required '/views/layouts/jobs.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/username/public_html/index.php on line 54 Problem not solved
  6. Hi All, My directory is /home/username/public_html/ In this directory i have: index.php, 'views' folder I want to access /home/username/public_html/views/layouts/jobs.php Within index.php, code wriiten is: require('../'.'views/layouts/'.$controller.'.php'); Error are: Warning: require(../views/layouts/jobs.php) [function.require]: failed to open stream: No such file or directory in /home/username/public_html/index.php on line 54 Fatal error: require() [function.require]: Failed opening required '../views/layouts/jobs.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/username/public_html/index.php on line 54 Kind help how to solve this problem. Thank you
×
×
  • 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.