sqlite - How to make an pdo_sqlite connection from binary stream in PHP -


having .sqlite file in memory stream (php://memory), want pipe pdo_sqlite driver create connection. possible?

its testing purposes, want recreate dbs without recreate schema @ each time nor using tmpfs.

in memory sqlite has limitations. memory space request, session, no way seems documented share base in memory among users.

for request, open base code

$pdo = new pdo( 'sqlite::memory:');  

and base disapear on next request.

for session persistency

<?php  $pdo = new pdo(      'sqlite::memory:',      null,      null,      array(pdo::attr_persistent => true)  );  ?> 

also read manual


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -