Jump to content

Display include file if.


JimDarr

Recommended Posts

It sounds like you're saying that the DB connection is in the include file, but you'd like to not include the include file if the DB connection in the include file fails?

You can't not include a file after you've included it, and you'll have to include it to see if the connection is successful. What's the actual issue you're dealing with?

Link to comment
Share on other sites

Yea that's it in a nutshell! 
I guess I'll need to think of another approach. 
I was hoping to return null or something from include if it fails and in layout file do something like:

  if( response not null ) display response
  else carry on with layout.php

Not a great explanation on my part, newibe as if its not clear!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.