The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#4
|
|||
|
|||
![]()
I think this should work:
Code:
$ourFileName = $vbulletin->options['thefile']; if (!file_exists($ourFileName)) { $ourFileHandle = fopen($ourFileName, 'w') or die("can't open file"); fclose($ourFileHandle); } but you probably wouldn't want the "or die()" part because that would leave you with a white page with an error message. You could do something like this: Code:
$ourFileName = $vbulletin->options['thefile']; if (!file_exists($ourFileName)) { $ourFileHandle = fopen($ourFileName, 'w'); if ($ourFileHandle === FALSE) { // Do something here to handle error } else { fclose($ourFileHandle); } } Also, using "w" in the fopen call will truncate the file (make it empty), so if you don't want that, use either "r" or "a". |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|